summaryrefslogtreecommitdiff
path: root/t/t5616-partial-clone.sh
diff options
context:
space:
mode:
authorLibravatar Matthew DeVore <matvore@google.com>2018-10-05 14:54:05 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-10-07 08:51:18 +0900
commit61de0ff695cf632f1a17fc0ebd4401bde2f7fa8f (patch)
tree78f14ce297ced493f0057e9a3730b47ee1345f58 /t/t5616-partial-clone.sh
parentt/*: fix ordering of expected/observed arguments (diff)
downloadtgif-61de0ff695cf632f1a17fc0ebd4401bde2f7fa8f.tar.xz
tests: don't swallow Git errors upstream of pipes
Some pipes in tests lose the exit code of git processes, which can mask unexpected behavior like crashes. Split these pipes up so that git commands are only at the end of pipes rather than the beginning or middle. The violations fixed in this patch were found in the process of fixing pipe placement in a prior patch. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5616-partial-clone.sh')
-rwxr-xr-xt/t5616-partial-clone.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
index e4d032c9db..fc7aeb1abd 100755
--- a/t/t5616-partial-clone.sh
+++ b/t/t5616-partial-clone.sh
@@ -35,8 +35,8 @@ test_expect_success 'setup bare clone for server' '
test_expect_success 'do partial clone 1' '
git clone --no-checkout --filter=blob:none "file://$(pwd)/srv.bare" pc1 &&
- git -C pc1 rev-list HEAD --quiet --objects --missing=print |
- awk -f print_1.awk |
+ git -C pc1 rev-list HEAD --quiet --objects --missing=print >revs &&
+ awk -f print_1.awk revs |
sed "s/?//" |
sort >observed.oids &&
@@ -133,16 +133,18 @@ test_expect_success 'push new commits to server for file.3.txt' '
test_expect_success 'manual prefetch of missing objects' '
git -C pc1 fetch --filter=blob:none origin &&
- git -C pc1 rev-list master..origin/master --quiet --objects --missing=print |
- awk -f print_1.awk |
+ git -C pc1 rev-list master..origin/master --quiet --objects --missing=print \
+ >revs &&
+ awk -f print_1.awk revs |
sed "s/?//" |
sort >observed.oids &&
test_line_count = 6 observed.oids &&
git -C pc1 fetch-pack --stdin "file://$(pwd)/srv.bare" <observed.oids &&
- git -C pc1 rev-list master..origin/master --quiet --objects --missing=print |
- awk -f print_1.awk |
+ git -C pc1 rev-list master..origin/master --quiet --objects --missing=print \
+ >revs &&
+ awk -f print_1.awk revs |
sed "s/?//" |
sort >observed.oids &&