[patch] improved ignore pattern matching (#57637)
John Arbash Meinel
john at arbash-meinel.com
Mon Nov 27 16:31:23 GMT 2006
Kent Gibson wrote:
>
>
> Jan Hudec wrote:
>>> Actually the former does not. Because the two slashes in '/**/'
>>> will not match a single '/' (while it does in zsh style, because
>>> there it is actually '**/', that can match empty string). For
>>> extensions (the more common case), the later can be used instead.
>>> But if you wanted to ignore eg. CVS dirs, under your proposal you
>>> have to say: foo/CVS foo/**/CVS while under zsh style it is just:
>>> foo/**/CVS
>>>
> How about the pattern 'foo**/CVS' - it will match 'foo/CVS' and
> 'foo/bar/CVS', but should it match 'fooCVS'?
>
> Cheers,
> Kent.
>
Well, it will also match 'foobar/CVS'. The way it is written, it seems
like '**/' should match either nothing, or something that ends in a
directory separator, which sounds like a good match for (.+/)?
I also prefer (.+/)? to (|.+/). As an aside, these should probably all
be (?:) style, which uses a group that can't be referenced later, which
can save processing overhead. (And the fact that the python regex engine
has a hard limit on the number of groups it can handle per regex).
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061127/99d94045/attachment.pgp
More information about the bazaar
mailing list