diff --git a/compat/win32/fscache.c b/compat/win32/fscache.c index d42ff66ba5106e..313361867414ed 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; @@ -353,7 +354,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 1326fd7505fde3..d11e8acfaedb27 100644 --- a/t/README +++ b/t/README @@ -392,6 +392,9 @@ GIT_TEST_SIDEBAND_ALL=, when true, overrides the fetch-pack to not request sideband-all (even if the server advertises sideband-all). +GIT_TEST_FSCACHE= exercises the uncommon fscache code path +which adds a cache below mingw's lstat and dirent implementations. + Naming Tests ------------