Skip to content

Commit 6dadeac

Browse files
committed
Merge pull request #1911 from benpeart/git_test_fscache-gfw
fscache: add GIT_TEST_FSCACHE support
2 parents ea8995f + b79aa82 commit 6dadeac

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

compat/win32/fscache.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "../../hashmap.h"
33
#include "../win32.h"
44
#include "fscache.h"
5+
#include "config.h"
56

67
static int initialized;
78
static volatile long enabled;
@@ -406,7 +407,11 @@ int fscache_enable(int enable)
406407
int result;
407408

408409
if (!initialized) {
410+
int fscache = git_env_bool("GIT_TEST_FSCACHE", -1);
411+
409412
/* allow the cache to be disabled entirely */
413+
if (fscache != -1)
414+
core_fscache = fscache;
410415
if (!core_fscache)
411416
return 0;
412417

t/README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,9 @@ GIT_TEST_SIDEBAND_ALL=<boolean>, when true, overrides the
392392
fetch-pack to not request sideband-all (even if the server advertises
393393
sideband-all).
394394

395+
GIT_TEST_FSCACHE=<boolean> exercises the uncommon fscache code path
396+
which adds a cache below mingw's lstat and dirent implementations.
397+
395398
Naming Tests
396399
------------
397400

0 commit comments

Comments
 (0)