From: Junio C Hamano Date: Thu, 28 Jan 2010 20:25:22 GMT Subject: Re: show/diff --check clarification needed Message-ID: <7vmxzykmdp.fsf@alter.siamese.dyndns.org> In-Reply-To: "Yann Dirson" writes: > Unless I missed something, I suggest the following plan: > > - document in maint that --check only takes worktree into account when > looking for .gitattributes, and more globally add a note to the > gitattributes manpage to explicitely say that too. It is not limited to "diff --check". The current implementation reads attributes only from the checked out work tree and/or from the index, depending on the direction of operation (e.g. checking out files to work tree reads from the index, I think). The same issue would affect "git archive" when generating a tarball from an older revision. The exception is $GIT_DIR/info/gitattributes, and for your particular purpose, I think it is the right one to use, because the entries in that file will apply regardless of which version you are examining patches from. > - add a global flag to allow something like > "git --attributes-tree= " I am not sure if this is what we really want. It seems to me that it would make more sense to read from a relevant tree that the is operating on, if we are to enhance the attributes implementation. If that is a fixed one, it is not much better than having necessary entries in your $GIT_DIR/info/gitattributes file. > - adjust defaults to agreed-upon values > - add any config entries that would be meaningful Sorry, I have no idea what you mean by these two points. Thanks.