Skip to content

Commit

Permalink
Merge pull request #1911 from benpeart/git_test_fscache-gfw
Browse files Browse the repository at this point in the history
fscache: add GIT_TEST_FSCACHE support
  • Loading branch information
dscho authored and Git for Windows Build Agent committed Sep 29, 2020
2 parents a3a132f + 8fc48d8 commit c5e9747
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compat/win32/fscache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "../../hashmap.h"
#include "../win32.h"
#include "fscache.h"
#include "config.h"

static int initialized;
static volatile long enabled;
Expand Down Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions t/README
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,9 @@ GIT_TEST_CHECKOUT_WORKERS=<n> overrides the 'checkout.workers' setting
to <n> and 'checkout.thresholdForParallelism' to 0, forcing the
execution of the parallel-checkout code.

GIT_TEST_FSCACHE=<boolean> exercises the uncommon fscache code path
which adds a cache below mingw's lstat and dirent implementations.

Naming Tests
------------

Expand Down

0 comments on commit c5e9747

Please sign in to comment.