summaryrefslogtreecommitdiff
path: root/preload-index.c
diff options
context:
space:
mode:
authorBen Peart <benpeart@microsoft.com>2018-09-18 23:29:37 +0000
committerJunio C Hamano <gitster@pobox.com>2018-09-28 11:41:01 -0700
commit5765d97b71d7489f927354e1704fc0d1d7ef90a0 (patch)
tree3a70266eea5461b3295bf83805c6bb676f164bbf /preload-index.c
parent1f357b045b503873626a72ac97797352a3cd2e87 (diff)
downloadgit-5765d97b71d7489f927354e1704fc0d1d7ef90a0.tar.gz
preload-index: update GIT_FORCE_PRELOAD_TEST support
Rename GIT_FORCE_PRELOAD_TEST to GIT_TEST_PRELOAD_INDEX for consistency with the other GIT_TEST_ special setups and properly document its use. Add logic in t/test-lib.sh to give a warning when the old variable is set to let people know they need to update their environment to use the new variable. Signed-off-by: Ben Peart <Ben.Peart@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'preload-index.c')
-rw-r--r--preload-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/preload-index.c b/preload-index.c
index 0a4e2933bb..a850e197c2 100644
--- a/preload-index.c
+++ b/preload-index.c
@@ -85,7 +85,7 @@ static void preload_index(struct index_state *index,
return;
threads = index->cache_nr / THREAD_COST;
- if ((index->cache_nr > 1) && (threads < 2) && git_env_bool("GIT_FORCE_PRELOAD_TEST", 0))
+ if ((index->cache_nr > 1) && (threads < 2) && git_env_bool("GIT_TEST_PRELOAD_INDEX", 0))
threads = 2;
if (threads < 2)
return;