summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-04-14 15:34:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-16 03:38:58 (GMT)
commit4c2db93807f5ab65976a901b562e4bc8d69d40bf (patch)
treed683a58b9ccb1e4b844f4a74bc7c4e99cf7ee0c8 /read-cache.c
parentfe0a9eaf31dd0c349ae4308498c33a5c3794b293 (diff)
downloadgit-4c2db93807f5ab65976a901b562e4bc8d69d40bf.zip
git-4c2db93807f5ab65976a901b562e4bc8d69d40bf.tar.gz
git-4c2db93807f5ab65976a901b562e4bc8d69d40bf.tar.bz2
read-cache.c: make $GIT_TEST_SPLIT_INDEX boolean
While at there, document about this special mode when running the test suite. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c
index 10f1c6b..fa3df2e 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -2268,7 +2268,7 @@ static int do_write_index(struct index_state *istate, struct tempfile *tempfile,
if (!istate->version) {
istate->version = get_index_format_default();
- if (getenv("GIT_TEST_SPLIT_INDEX"))
+ if (git_env_bool("GIT_TEST_SPLIT_INDEX", 0))
init_split_index(istate);
}
@@ -2559,7 +2559,7 @@ int write_locked_index(struct index_state *istate, struct lock_file *lock,
goto out;
}
- if (getenv("GIT_TEST_SPLIT_INDEX")) {
+ if (git_env_bool("GIT_TEST_SPLIT_INDEX", 0)) {
int v = si->base_sha1[0];
if ((v & 15) < 6)
istate->cache_changed |= SPLIT_INDEX_ORDERED;