t0410: remove pipes after git commands

Let's not run a git command, especially one with "verify" in its name, upstream of a pipe, because the pipe will hide the git command's exit code. While at it, let's also avoid a useless `cat` command piping into `sed`. Helped-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Christian Couder committed Jun 25, 2019 at 15:40 UTC c59c7c879ef60b2b0d0b050982712c53ec4d0680
1 file changed +6 -4
t/t0410-partial-clone.sh
+6 -4
@@ -166,8 +166,9 @@ test_expect_success 'fetching of missing objects' '
166 # associated packfile contains the object
167 ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
168 test_line_count = 1 promisorlist &&
169 - IDX=$(cat promisorlist | sed "s/promisor$/idx/") &&
170 - git verify-pack --verbose "$IDX" | grep "$HASH"
169 + IDX=$(sed "s/promisor$/idx/" promisorlist) &&
170 + git verify-pack --verbose "$IDX" >out &&
171 + grep "$HASH" out
172 '
173
174 test_expect_success 'fetching of missing objects works with ref-in-want enabled' '
@@ -514,8 +515,9 @@ test_expect_success 'fetching of missing objects from an HTTP server' '
515 # associated packfile contains the object
516 ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
517 test_line_count = 1 promisorlist &&
517 - IDX=$(cat promisorlist | sed "s/promisor$/idx/") &&
518 - git verify-pack --verbose "$IDX" | grep "$HASH"
518 + IDX=$(sed "s/promisor$/idx/" promisorlist) &&
519 + git verify-pack --verbose "$IDX" >out &&
520 + grep "$HASH" out
521 '
522
523 test_done