* [PATCH] attr: a note about the order of .gitattributes lookup
@ 2012-10-10 13:55 Nguyen Thai Ngoc Duy
2012-10-10 18:04 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2012-10-10 13:55 UTC (permalink / raw)
To: git; +Cc: Johannes Sixt, Junio C Hamano
This is the documentation part of
1a9d7e9 (attr.c: read .gitattributes from index as well. - 2007-08-14)
06f33c1 (Read attributes from the index that is being checked out - 2009-03-13)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
I looked around but did not see anywhere mentioning this. If I did
not miss anything, then we should take a note about this to avoid
surprises.
Resend, this time git@vger is CCed. Sorry for the noise.
Documentation/gitattributes.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 99ed04d..8c52a99 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -66,6 +66,12 @@ is from the path in question, the lower its precedence). Finally
global and system-wide files are considered (they have the lowest
precedence).
+Normally if `.gitattributes` is not found in a directory in work tree,
+the same path in the index is examined. If there's a `.gitattributes`
+version in the index, that version will be used. During checkout process,
+the order of examination is reversed: index version is preferred over
+the work tree version.
+
If you wish to affect only a single repository (i.e., to assign
attributes to files that are particular to
one user's workflow for that repository), then
--
1.7.12.1.406.g6ab07c4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] attr: a note about the order of .gitattributes lookup
2012-10-10 13:55 [PATCH] attr: a note about the order of .gitattributes lookup Nguyen Thai Ngoc Duy
@ 2012-10-10 18:04 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2012-10-10 18:04 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy; +Cc: git, Johannes Sixt
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> This is the documentation part of
>
> 1a9d7e9 (attr.c: read .gitattributes from index as well. - 2007-08-14)
> 06f33c1 (Read attributes from the index that is being checked out - 2009-03-13)
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> I looked around but did not see anywhere mentioning this. If I did
> not miss anything, then we should take a note about this to avoid
> surprises.
>
> Resend, this time git@vger is CCed. Sorry for the noise.
>
> Documentation/gitattributes.txt | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
> index 99ed04d..8c52a99 100644
> --- a/Documentation/gitattributes.txt
> +++ b/Documentation/gitattributes.txt
> @@ -66,6 +66,12 @@ is from the path in question, the lower its precedence). Finally
> global and system-wide files are considered (they have the lowest
> precedence).
>
> +Normally if `.gitattributes` is not found in a directory in work tree,
> +the same path in the index is examined. If there's a `.gitattributes`
> +version in the index, that version will be used. During checkout process,
> +the order of examination is reversed: index version is preferred over
> +the work tree version.
> +
Yeah, thanks for writing it up. The "direction" fix was done to
help people when they check out a commit when a different commit
with different .gitattributes is checked out to the working tree.
> If you wish to affect only a single repository (i.e., to assign
> attributes to files that are particular to
> one user's workflow for that repository), then
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-10 18:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-10 13:55 [PATCH] attr: a note about the order of .gitattributes lookup Nguyen Thai Ngoc Duy
2012-10-10 18:04 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).