Junio C Hamano <gits...@pobox.com> writes:

> Thomas Rast <tr...@inf.ethz.ch> writes:
>
>> Johannes Sixt <j.s...@viscovery.net> writes:
>>
>>> Am 5/16/2013 22:50, schrieb Thomas Rast:
>>>> +match_pattern_list () {
>>>> +  arg="$1"
>>>> +  shift
>>>> +  test -z "$*" && return 1
>>>> +  for pat in $@
>>>
>>> You should have double-quotes around $@ here, but then you can just as
>>> well abbreviate to
>>>
>>>     for pat
>>>
>>> and you don't need the 'test -z "$*' check anymore.
>>
>> Hmm, actually the quotes wouldn't help, because it currently reads
>>
>> -    for skp in $GIT_SKIP_TESTS
>> -    do
>> -            case $this_test.$test_count in
>> -            $skp)
>> -                    to_skip=t
>> -                    break
>> -            esac
>> -    done
[...]
>> But the 'for pat' with implicit $@ sounds nice regardless, thanks.
>
> 'for pat' is equivalent to 'for pat in "$@"', not 'for pat in $@';
> would it still be useful when you need them split at $IFS?

At this point the splitting has already happened in the caller when it
does the (refactored)

+       if match_pattern_list $this_test.$test_count $GIT_SKIP_TESTS

So $@ and "$@" is actually the same thing.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to