t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index
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>
SZEDER Gábor committed
Sep 6, 2018 at 04:48 UTC
456d7cd3a96bdc8b14af6440051805de8a581364
1 file changed
+10
-7
t/t0090-cache-tree.sh
+10
-7
@@ -243,13 +243,16 @@ test_expect_success 'no phantom error when switching trees' '
243
'
244
245
test_expect_success 'switching trees does not invalidate shared index' '
246
- git update-index --split-index &&
247
- >split &&
248
- git add split &&
249
- test-tool dump-split-index .git/index | grep -v ^own >before &&
250
- git commit -m "as-is" &&
251
- test-tool dump-split-index .git/index | grep -v ^own >after &&
252
- test_cmp before after
246
+ (
247
+ sane_unset GIT_TEST_SPLIT_INDEX &&
248
+ git update-index --split-index &&
249
+ >split &&
250
+ git add split &&
251
+ test-tool dump-split-index .git/index | grep -v ^own >before &&
252
+ git commit -m "as-is" &&
253
+ test-tool dump-split-index .git/index | grep -v ^own >after &&
254
+ test_cmp before after
255
+ )
256
'
257
258
test_done