Re: [PATCH 04/10] attr: more matching optimizations from .gitignore

2012-10-08 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: > My objection is no-op lines are timed bombs. But users can already do > "dir attr" (no slashes), which is no-op. So yeah, no-op is fine. Exactly. If you are not catching and barfing the no-slashed variant at the syntax level (and you shouldn't), you shouldn't do so

Re: [PATCH 04/10] attr: more matching optimizations from .gitignore

2012-10-07 Thread Nguyen Thai Ngoc Duy
On Sat, Oct 6, 2012 at 1:48 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> +Unlike `.gitignore`, negative patterns are not supported. >> +Patterns that match directories are also not supported. > > Is "are not supported" the right phrasing? > > I think it makes perfect sense not to

Re: [PATCH 04/10] attr: more matching optimizations from .gitignore

2012-10-06 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: > On Sat, Oct 6, 2012 at 12:36 PM, Junio C Hamano wrote: >>> Or the user might think "path/ attr1" sets attr1 for all files under >>> "path/" because it does not make sense to attach attributes to a >>> directory in git. >> >>... >> >>We may not have a need t

Re: [PATCH 04/10] attr: more matching optimizations from .gitignore

2012-10-05 Thread Nguyen Thai Ngoc Duy
On Sat, Oct 6, 2012 at 12:36 PM, Junio C Hamano wrote: >> Or the user might think "path/ attr1" sets attr1 for all files under >> "path/" because it does not make sense to attach attributes to a >> directory in git. > >... > >We may not have a need to assign a real attribute to a directory

Re: [PATCH 04/10] attr: more matching optimizations from .gitignore

2012-10-05 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: > On Sat, Oct 6, 2012 at 1:48 AM, Junio C Hamano wrote: >> Nguyễn Thái Ngọc Duy writes: >> >>> +Unlike `.gitignore`, negative patterns are not supported. >>> +Patterns that match directories are also not supported. >> >> Is "are not supported" the right phrasing? >>

Re: [PATCH 04/10] attr: more matching optimizations from .gitignore

2012-10-05 Thread Nguyen Thai Ngoc Duy
On Sat, Oct 6, 2012 at 1:48 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> +Unlike `.gitignore`, negative patterns are not supported. >> +Patterns that match directories are also not supported. > > Is "are not supported" the right phrasing? > > I think it makes perfect sense not to

Re: [PATCH 04/10] attr: more matching optimizations from .gitignore

2012-10-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > +Unlike `.gitignore`, negative patterns are not supported. > +Patterns that match directories are also not supported. Is "are not supported" the right phrasing? I think it makes perfect sense not to forbid "!path attr1", because it is unclear what it means (e.g. "

[PATCH 04/10] attr: more matching optimizations from .gitignore

2012-10-05 Thread Nguyễn Thái Ngọc Duy
.gitattributes and .gitignore share the same pattern syntax but has separate matching implementation. Over the years, ignore's implementation accumulates more optimizations while attr's stays the same. This patch adds those optimizations to .gitattributes. Basically it tries to avoid fnmatch/wildm