Re: [PATCH 1/1] t0001: fix on case-insensitive filesystems
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jun 21, 2019, 19:33 UTC
- Message-ID
- <878stu91jl.fsf@evledraar.gmail.com>
- In-Reply-To
- <20190609201302.GX8616@genre.crustytoothpaste.net>
On Sun, Jun 09 2019, brian m. carlson wrote:
Show 15 quoted lines
> 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 ",".