mirror of
https://github.com/git/git
synced 2024-08-28 20:20:07 +00:00
Documentation: clarify .gitattributes search
Use the term "toplevel of the work tree" in gitattributes.txt and gitignore.txt to define the limits of the search for those files. Signed-off-by: Jason Merrill <jason@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
39470cf961
commit
20ff3ec28e
|
@ -59,9 +59,9 @@ attribute.
|
||||||
When deciding what attributes are assigned to a path, git
|
When deciding what attributes are assigned to a path, git
|
||||||
consults `$GIT_DIR/info/attributes` file (which has the highest
|
consults `$GIT_DIR/info/attributes` file (which has the highest
|
||||||
precedence), `.gitattributes` file in the same directory as the
|
precedence), `.gitattributes` file in the same directory as the
|
||||||
path in question, and its parent directories (the further the
|
path in question, and its parent directories up to the toplevel of the
|
||||||
directory that contains `.gitattributes` is from the path in
|
work tree (the further the directory that contains `.gitattributes`
|
||||||
question, the lower its precedence).
|
is from the path in question, the lower its precedence).
|
||||||
|
|
||||||
If you wish to affect only a single repository (i.e., to assign
|
If you wish to affect only a single repository (i.e., to assign
|
||||||
attributes to files that are particular to one user's workflow), then
|
attributes to files that are particular to one user's workflow), then
|
||||||
|
|
|
@ -31,8 +31,8 @@ precedence, the last matching pattern decides the outcome):
|
||||||
|
|
||||||
* Patterns read from a `.gitignore` file in the same directory
|
* Patterns read from a `.gitignore` file in the same directory
|
||||||
as the path, or in any parent directory, with patterns in the
|
as the path, or in any parent directory, with patterns in the
|
||||||
higher level files (up to the root) being overridden by those in
|
higher level files (up to the toplevel of the work tree) being overridden
|
||||||
lower level files down to the directory containing the file.
|
by those in lower level files down to the directory containing the file.
|
||||||
These patterns match relative to the location of the
|
These patterns match relative to the location of the
|
||||||
`.gitignore` file. A project normally includes such
|
`.gitignore` file. A project normally includes such
|
||||||
`.gitignore` files in its repository, containing patterns for
|
`.gitignore` files in its repository, containing patterns for
|
||||||
|
|
Loading…
Reference in a new issue