aboutsummaryrefslogtreecommitdiffstats
path: root/t/t5702-protocol-v2.sh
diff options
context:
space:
mode:
authorMatthew DeVore <matvore@google.com>2018-10-05 14:54:07 -0700
committerJunio C Hamano <gitster@pobox.com>2018-10-07 08:51:18 +0900
commit8d6ba49563600d8e65c7f56fb0f29e23a571a75f (patch)
tree16c19d5d3fc8c85a1c136ae2b10249ccd4cbe372 /t/t5702-protocol-v2.sh
parentt9109: don't swallow Git errors upstream of pipes (diff)
downloadgit-8d6ba49563600d8e65c7f56fb0f29e23a571a75f.tar.gz
git-8d6ba49563600d8e65c7f56fb0f29e23a571a75f.zip
tests: order arguments to git-rev-list properly
It is a common mistake to put positional arguments before flags when invoking git-rev-list. Order the positional arguments last. This patch skips git-rev-list invocations which include the --not flag, since the ordering of flags and positional arguments affects the behavior. This patch also skips invocations of git-rev-list that occur in command substitution in which the exit code is discarded, since fixing those properly will require a more involved cleanup. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5702-protocol-v2.sh')
-rwxr-xr-xt/t5702-protocol-v2.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh
index 54727450b0..11a84efffe 100755
--- a/t/t5702-protocol-v2.sh
+++ b/t/t5702-protocol-v2.sh
@@ -271,7 +271,7 @@ test_expect_success 'partial clone' '
grep "version 2" trace &&
# Ensure that the old version of the file is missing
- git -C client rev-list master --quiet --objects --missing=print \
+ git -C client rev-list --quiet --objects --missing=print master \
>observed.oids &&
grep "$(git -C server rev-parse message1:a.txt)" observed.oids &&
@@ -297,7 +297,7 @@ test_expect_success 'partial fetch' '
grep "version 2" trace &&
# Ensure that the old version of the file is missing
- git -C client rev-list other --quiet --objects --missing=print \
+ git -C client rev-list --quiet --objects --missing=print other \
>observed.oids &&
grep "$(git -C server rev-parse message1:a.txt)" observed.oids &&