Skip to content

Commit 3f74c8e

Browse files
j6tgitster
authored andcommitted
gitattributes.txt: Path matching rules are explained in gitignore.txt
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a9d98a1 commit 3f74c8e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Documentation/gitattributes.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ A `gitattributes` file is a simple text file that gives
1818

1919
Each line in `gitattributes` file is of form:
2020

21-
glob attr1 attr2 ...
21+
pattern attr1 attr2 ...
2222

23-
That is, a glob pattern followed by an attributes list,
24-
separated by whitespaces. When the glob pattern matches the
23+
That is, a pattern followed by an attributes list,
24+
separated by whitespaces. When the pattern matches the
2525
path in question, the attributes listed on the line are given to
2626
the path.
2727

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

4949
Unspecified::
5050

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

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

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

0 commit comments

Comments
 (0)