t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index
authorSZEDER Gábor <szeder.dev@gmail.com>
Thu, 6 Sep 2018 02:48:07 +0000 (04:48 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2018 21:07:25 +0000 (14:07 -0700)
The test 'switching trees does not invalidate shared index' in
't0090-cache-tree.sh' is about verifying the behaviour of the split
index feature, therefore it should be in full control of when index
splitting is performed, like all the tests in 't1700-split-index.sh'.

Unset GIT_TEST_SPLIT_INDEX for this test to avoid unintended random
index splitting.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0090-cache-tree.sh
index 7de40141ca84dc53657d81c0254870b387339f79..99fe609aadd3ff08c4d01a2b1b209959c7c989ea 100755 (executable)
@@ -243,13 +243,16 @@ test_expect_success 'no phantom error when switching trees' '
 '
 
 test_expect_success 'switching trees does not invalidate shared index' '
-       git update-index --split-index &&
-       >split &&
-       git add split &&
-       test-tool dump-split-index .git/index | grep -v ^own >before &&
-       git commit -m "as-is" &&
-       test-tool dump-split-index .git/index | grep -v ^own >after &&
-       test_cmp before after
+       (
+               sane_unset GIT_TEST_SPLIT_INDEX &&
+               git update-index --split-index &&
+               >split &&
+               git add split &&
+               test-tool dump-split-index .git/index | grep -v ^own >before &&
+               git commit -m "as-is" &&
+               test-tool dump-split-index .git/index | grep -v ^own >after &&
+               test_cmp before after
+       )
 '
 
 test_done