Re: [PATCHv2 08/14] completion: let 'for-each-ref' and 'ls-remote' filter matching refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 24, 2017 at 8:42 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Thu, Mar 23, 2017 at 04:29:18PM +0100, SZEDER Gábor wrote:
>>               case "$cur_" in
>>               refs|refs/*)
>>                       format="refname"
>> -                     refs="${cur_%/*}"
>> +                     refs=("$match*" "$match*/**")
>>                       track=""
>
> Working on the aforementioned patch, I noticed that for-each-ref's
> matching is a little tricky due to its path semantics. So I wanted to
> double-check your patterns. :) I think these should do the right thing.

Yeah, I always thought that it's weird that globbing in for-each-ref
behaves differently from globbing in ls-remote or refspecs, but there
is nothing we can do about it now.

Anyway, this is why the tests added in this patch include e.g. both
'matching-branch' and 'matching/branch'.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]