Skip to content

Commit 456d7cd

Browse files
szedergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent acdee9e commit 456d7cd

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

t/t0090-cache-tree.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,16 @@ test_expect_success 'no phantom error when switching trees' '
243243
'
244244

245245
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+
)
253256
'
254257

255258
test_done

0 commit comments

Comments
 (0)