Subject: Re: [PATCH 15/16] Revert and amend "test-lib-functions: assert correct parameter count"

From: Junio C Hamano <[email-masked]>
Date: Mon, 12 Apr 2021 12:37:23 -0700

Ævar Arnfjörð Bjarmason  <[email-masked]> writes:

>  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 1

What 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.