Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:57

Nguyen Thai Ngoc Duy [off-list ref] writes:
On Sat, Oct 6, 2012 at 12:36 PM, Junio C Hamano [off-list ref] wrote:
quoted
quoted
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
   right now, because nothing in Git asks for an attribute for a
   directory. But that does not necessarily mean we would never need a
   way to give an attribute to a directory but not to its contents.
Exactly why we should not make "path/ attr" no-op. If we want to make
it meaningful some day in future, I don't think we want those no-ops
lay around and suddenly cause changes in behavior with a new version
of git.
I do not think you understood.  "path/ attr" is a no-op from the
point of view of the *users* of the current versions of Git.  It is
perfectly fine to accept and apply attr to "path/"; no codepath in
Git should be asking about path/ anyway, so it ends up to be a
no-op.  You shouldn't be erroring out at the syntactic level, i.e.
when these lines are parsed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help