Re: [RFC] Refspec patterns with * in the middle

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

 



Jay Soffian <jaysoffian@xxxxxxxxx> writes:

> On Mon, Mar 2, 2009 at 1:25 PM, Daniel Barkalow <barkalow@xxxxxxxxxxxx> wrote:
>>> But the following is not:
>>>
>>>  - foo/bar*/baz
>>>
>>> IOW, '*' can only appear as a non-terminating symbol if it is bounded
>>> by '/' on each side.
>>
>> You have my criterion right, but I want that to be valid, but only match
>> things like "foo/bar-something/baz", not "foo/bar-a/b/baz".
>
> Ah, that makes sense. Perhaps use "**" to mean matching across path
> components which is what rsync does:
>
>  o  a '*' matches any non-empty path component (it stops at slashes).
>  o  use '**' to match anything, including slashes.
>
> ?

I personally do not think that makes much sense (and I find ** ugly, too).

We traditionally supported '*' only at the end, and it always has meant
"match through the end, including slashes".

Requiring 'match including slashes' to be spelled as '**' only when it is
not at the end is unnecessarily confusing.

Is there a valid use case when * wants to match across directory
boundaries when it is not at the end?  I offhand do not think of a sane
one.

So, it might make it easiest to understand if we say * usually does not
match slash, except when it is used at the end immediately after a slash,
in which case it means "match through the end".


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]

  Powered by Linux