diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-10-19 06:34:03 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-19 06:34:03 +0200 |
commit | 340fde61bea189b87268aa20581e243deb744577 (patch) | |
tree | 90d4144aea9a2ee2d48a464e18aa3284e7029d7b /preload-index.c | |
parent | Merge branch 'ss/wt-status-committable' (diff) | |
parent | t0000: do not get self-test disrupted by environment warnings (diff) | |
download | git-340fde61bea189b87268aa20581e243deb744577.tar.xz git-340fde61bea189b87268aa20581e243deb744577.zip |
Merge branch 'bp/rename-test-env-var'
Some environment variables that control the runtime options of Git
used during tests are getting renamed for consistency.
* bp/rename-test-env-var:
t0000: do not get self-test disrupted by environment warnings
preload-index: update GIT_FORCE_PRELOAD_TEST support
read-cache: update TEST_GIT_INDEX_VERSION support
fsmonitor: update GIT_TEST_FSMONITOR support
preload-index: use git_env_bool() not getenv() for customization
t/README: correct spelling of "uncommon"
Diffstat (limited to 'preload-index.c')
-rw-r--r-- | preload-index.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/preload-index.c b/preload-index.c index f7365761f4..16dc5ad868 100644 --- a/preload-index.c +++ b/preload-index.c @@ -5,6 +5,7 @@ #include "pathspec.h" #include "dir.h" #include "fsmonitor.h" +#include "config.h" #ifdef NO_PTHREADS static void preload_index(struct index_state *index, @@ -83,7 +84,7 @@ static void preload_index(struct index_state *index, return; threads = index->cache_nr / THREAD_COST; - if ((index->cache_nr > 1) && (threads < 2) && getenv("GIT_FORCE_PRELOAD_TEST")) + if ((index->cache_nr > 1) && (threads < 2) && git_env_bool("GIT_TEST_PRELOAD_INDEX", 0)) threads = 2; if (threads < 2) return; |