Merge pull request #1911 from benpeart/git_test_fscache-gfw

fscache: add GIT_TEST_FSCACHE support
This commit is contained in:
Johannes Schindelin
2018-11-05 14:24:12 +01:00
2 changed files with 8 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
#include "../../hashmap.h"
#include "../win32.h"
#include "fscache.h"
#include "config.h"
static int initialized;
static volatile long enabled;
@@ -382,7 +383,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;

View File

@@ -419,6 +419,9 @@ GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=<boolean>, when true (which is
the default when running tests), errors out when an abbreviated option
is used.
GIT_TEST_FSCACHE=<boolean> exercises the uncommon fscache code path
which adds a cache below mingw's lstat and dirent implementations.
Naming Tests
------------