Subject: Re: [PATCH 1/1] t0001: fix on case-insensitive filesystems

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Fri, 21 Jun 2019 21:33:02 +0200

On Sun, Jun 09 2019, brian m. carlson wrote:

> On 2019-06-08 at 14:43:43, Johannes Schindelin via GitGitGadget wrote:
>> diff --git a/t/t0001-init.sh b/t/t0001-init.sh
>> index 42a263cada..f54a69e2d9 100755
>> --- a/t/t0001-init.sh
>> +++ b/t/t0001-init.sh
>> @@ -307,10 +307,20 @@ test_expect_success 'init prefers command line to GIT_DIR' '
>>  	test_path_is_missing otherdir/refs
>>  '
>>
>> +downcase_on_case_insensitive_fs () {
>> +	test false = "$(git config --get core.filemode)" || return 0
>> +	for f
>
> TIL that “for f” is equivalent to “for f in "$@"”. Thanks for teaching
> me something new.

See also test_have_prereq in test-lib-functions.sh where this trick is
combined with IFS to loop over a "param,like,this" split by ",".