diff --git a/compat/win32/fscache.c b/compat/win32/fscache.c index 2f76b2eba5..abc924bbcd 100644 --- a/compat/win32/fscache.c +++ b/compat/win32/fscache.c @@ -2,6 +2,7 @@ #include "../../hashmap.h" #include "../win32.h" #include "fscache.h" +#include "config.h" static int initialized; static volatile long enabled; @@ -393,7 +394,11 @@ int fscache_enable(int enable) int result; if (!initialized) { + int fscache = git_env_bool("GIT_TEST_FSCACHE", -1); + /* allow the cache to be disabled entirely */ + if (fscache != -1) + core_fscache = fscache; if (!core_fscache) return 0; diff --git a/t/README b/t/README index a8cfd37387..6bd4bb66fe 100644 --- a/t/README +++ b/t/README @@ -443,6 +443,9 @@ GIT_TEST_CHECKOUT_WORKERS= overrides the 'checkout.workers' setting to and 'checkout.thresholdForParallelism' to 0, forcing the execution of the parallel-checkout code. +GIT_TEST_FSCACHE= exercises the uncommon fscache code path +which adds a cache below mingw's lstat and dirent implementations. + Naming Tests ------------