diff options
author | Christian Couder <christian.couder@gmail.com> | 2019-06-25 13:40:25 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-25 21:05:37 (GMT) |
commit | c59c7c879ef60b2b0d0b050982712c53ec4d0680 (patch) | |
tree | b67e863a933bb2698327f6e9703f561047519efd /t/t0410-partial-clone.sh | |
parent | 8dca754b1e874719a732bc9ab7b0e14b21b1bc10 (diff) | |
download | git-c59c7c879ef60b2b0d0b050982712c53ec4d0680.zip git-c59c7c879ef60b2b0d0b050982712c53ec4d0680.tar.gz git-c59c7c879ef60b2b0d0b050982712c53ec4d0680.tar.bz2 |
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>
Diffstat (limited to 't/t0410-partial-clone.sh')
-rwxr-xr-x | t/t0410-partial-clone.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh index 5bd892f..3559313 100755 --- a/t/t0410-partial-clone.sh +++ b/t/t0410-partial-clone.sh @@ -166,8 +166,9 @@ test_expect_success 'fetching of missing objects' ' # associated packfile contains the object ls repo/.git/objects/pack/pack-*.promisor >promisorlist && test_line_count = 1 promisorlist && - IDX=$(cat promisorlist | sed "s/promisor$/idx/") && - git verify-pack --verbose "$IDX" | grep "$HASH" + IDX=$(sed "s/promisor$/idx/" promisorlist) && + git verify-pack --verbose "$IDX" >out && + grep "$HASH" out ' 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' ' # associated packfile contains the object ls repo/.git/objects/pack/pack-*.promisor >promisorlist && test_line_count = 1 promisorlist && - IDX=$(cat promisorlist | sed "s/promisor$/idx/") && - git verify-pack --verbose "$IDX" | grep "$HASH" + IDX=$(sed "s/promisor$/idx/" promisorlist) && + git verify-pack --verbose "$IDX" >out && + grep "$HASH" out ' test_done |