Merge branch 'sg/split-index-test'
authorJunio C Hamano <gitster@pobox.com>
Mon, 24 Sep 2018 17:30:53 +0000 (10:30 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Sep 2018 17:30:53 +0000 (10:30 -0700)
Test updates.

* sg/split-index-test:
t0090: disable GIT_TEST_SPLIT_INDEX for the test checking split index
t1700-split-index: drop unnecessary 'grep'

t/t0090-cache-tree.sh
t/t1700-split-index.sh
index 94fcb4a78e661ae793eef54ae98b4821218b1e29..504334e552251ed0c1f74536f6fd09ffccda615d 100755 (executable)
@@ -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
index b3b4d83eafc4a031618a3a89fd8ca50353f1a844..be22398a8545419f3d12d4d48cb636c5273b5206 100755 (executable)
@@ -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