Re: show/diff --check clarification needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Yann Dirson" <ydirson@xxxxxxxxxx> 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=<treeish> <command>"

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 <command>
is operating on, if we are to enhance the attributes implementation.  If
that <treeish> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]