t1700-split-index: drop unnecessary 'grep'
authorSZEDER Gábor <szeder.dev@gmail.com>
Thu, 6 Sep 2018 02:48:06 +0000 (04:48 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2018 21:06:07 +0000 (14:06 -0700)
The test 'disable split index' in 't1700-split-index.sh' runs the
following pipeline:

cmd | grep <pattern> | sed s///

Drop that 'grep' from the pipeline, and let 'sed' take over its
duties.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1700-split-index.sh
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