diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-21 22:57:57 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-21 22:57:57 +0900 |
commit | 85f6afc28b64cfd233f80f56896941530df0dcc0 (patch) | |
tree | 7cefdfd4743306d7266d7d88336614c683832d31 | |
parent | Merge branch 'bw/protocol-v2' into maint (diff) | |
parent | t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index (diff) | |
download | tgif-85f6afc28b64cfd233f80f56896941530df0dcc0.tar.xz |
Merge branch 'sg/split-index-test' into maint
Test updates.
* sg/split-index-test:
t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index
t1700-split-index: drop unnecessary 'grep'
-rwxr-xr-x | t/t0090-cache-tree.sh | 17 | ||||
-rwxr-xr-x | t/t1700-split-index.sh | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh index 94fcb4a78e..504334e552 100755 --- a/t/t0090-cache-tree.sh +++ b/t/t0090-cache-tree.sh @@ -261,13 +261,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 diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index ae74d2664a..f053bf83eb 100755 --- a/t/t1700-split-index.sh +++ b/t/t1700-split-index.sh @@ -67,7 +67,7 @@ test_expect_success 'disable split index' ' EOF test_cmp ls-files.expect ls-files.actual && - BASE=$(test-tool dump-split-index .git/index | grep "^own" | sed "s/own/base/") && + BASE=$(test-tool dump-split-index .git/index | sed -n "s/^own/base/p") && test-tool dump-split-index .git/index | sed "/^own/d" >actual && cat >expect <<-EOF && not a split index |