Skip to content

Commit

Permalink
gitattributes.txt: Path matching rules are explained in gitignore.txt
Browse files Browse the repository at this point in the history
The rules how the patterns are matched against path names are the same
for .gitattribute and .gitignore files.

This also replace the notion "glob pattern" by "pattern" because
gitignore.txt talks about "glob" only in some contexts where the pattern
is mentioned.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Feb 25, 2009
1 parent a9d98a1 commit 3f74c8e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Documentation/gitattributes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ A `gitattributes` file is a simple text file that gives

Each line in `gitattributes` file is of form:

glob attr1 attr2 ...
pattern attr1 attr2 ...

That is, a glob pattern followed by an attributes list,
separated by whitespaces. When the glob pattern matches the
That is, a pattern followed by an attributes list,
separated by whitespaces. When the pattern matches the
path in question, the attributes listed on the line are given to
the path.

Expand All @@ -48,13 +48,14 @@ Set to a value::

Unspecified::

No glob pattern matches the path, and nothing says if
No pattern matches the path, and nothing says if
the path has or does not have the attribute, the
attribute for the path is said to be Unspecified.

When more than one glob pattern matches the path, a later line
When more than one pattern matches the path, a later line
overrides an earlier line. This overriding is done per
attribute.
attribute. The rules how the pattern matches paths are the
same as in `.gitignore` files; see linkgit:gitignore[5].

When deciding what attributes are assigned to a path, git
consults `$GIT_DIR/info/attributes` file (which has the highest
Expand Down

0 comments on commit 3f74c8e

Please sign in to comment.