Skip to content

Commit cff90bd

Browse files
committed
Merge branch 'sg/split-index-test'
Test updates. * sg/split-index-test: t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index t1700-split-index: drop unnecessary 'grep'
2 parents f52b7ee + 456d7cd commit cff90bd

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

t/t0090-cache-tree.sh

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

263263
test_expect_success 'switching trees does not invalidate shared index' '
264-
git update-index --split-index &&
265-
>split &&
266-
git add split &&
267-
test-tool dump-split-index .git/index | grep -v ^own >before &&
268-
git commit -m "as-is" &&
269-
test-tool dump-split-index .git/index | grep -v ^own >after &&
270-
test_cmp before after
264+
(
265+
sane_unset GIT_TEST_SPLIT_INDEX &&
266+
git update-index --split-index &&
267+
>split &&
268+
git add split &&
269+
test-tool dump-split-index .git/index | grep -v ^own >before &&
270+
git commit -m "as-is" &&
271+
test-tool dump-split-index .git/index | grep -v ^own >after &&
272+
test_cmp before after
273+
)
271274
'
272275

273276
test_done

t/t1700-split-index.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ test_expect_success 'disable split index' '
5757
EOF
5858
test_cmp ls-files.expect ls-files.actual &&
5959
60-
BASE=$(test-tool dump-split-index .git/index | grep "^own" | sed "s/own/base/") &&
60+
BASE=$(test-tool dump-split-index .git/index | sed -n "s/^own/base/p") &&
6161
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
6262
cat >expect <<-EOF &&
6363
not a split index

0 commit comments

Comments
 (0)