Re: [PATCH 15/16] Revert and amend "test-lib-functions: assert correct parameter count"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 12, 2021, 19:37 UTC
- Message-ID
- <xmqqa6q3cn0s.fsf@gitster.g>
- In-Reply-To
- <patch-15.16-0cd511206c4-20210412T110456Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 8 quoted lines
> test_path_is_file () {
> - test "$#" -ne 1 && BUG "1 param"
> - if ! test -f "$1"
> + if ! test -f "$@"
> then
> - echo "File $1 doesn't exist"
> + echo "File $@ doesn't exist"
> return 1What does it even mean to call
test_path_is_file Documentation/ Makefile
with this patch applied?
If there were three files "COPYING Makefile", "COPYING", and "Makefile", what would happen when you did
test_path_is_file COPYING Makefile
(without dq around them)?
I think this particular medicine is far worse than the symptom it tries to cure.