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>
This commit is contained in:
committed by
Junio C Hamano
parent
b00b6ace5c
commit
8d6ba49563
@ -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 &&
|
||||
|
||||
|
||||
Reference in New Issue
Block a user