diff --git a/compat/win32/fscache.c b/compat/win32/fscache.c index aa9df4f4f742f6..bafe42b9c9f7c6 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; @@ -397,7 +398,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 3f645b083ac6d2..a98ab45e09694b 100644 --- a/t/README +++ b/t/README @@ -367,6 +367,9 @@ GIT_TEST_MULTI_PACK_INDEX=, when true, forces the multi-pack- index to be written after every 'git repack' command, and overrides the 'core.multiPackIndex' setting to true. +GIT_TEST_FSCACHE= exercises the uncommon fscache code path +which adds a cache below mingw's lstat and dirent implementations. + Naming Tests ------------