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

2012-10-08 Thread Junio C Hamano
Nguyen Thai Ngoc Duy pclo...@gmail.com 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

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 gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com 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

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

2012-10-06 Thread Nguyen Thai Ngoc Duy
On Sat, Oct 6, 2012 at 12:36 PM, Junio C Hamano gits...@pobox.com 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

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

2012-10-06 Thread Junio C Hamano
Nguyen Thai Ngoc Duy pclo...@gmail.com writes: On Sat, Oct 6, 2012 at 12:36 PM, Junio C Hamano gits...@pobox.com 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

[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

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

2012-10-05 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com 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

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 gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com 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