1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-30 12:36:07 +02:00

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'
This commit is contained in:
Junio C Hamano 2018-09-24 10:30:53 -07:00
commit cff90bdc5c
2 changed files with 11 additions and 8 deletions

View File

@ -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

View File

@ -57,7 +57,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