Skip to content

Commit d16c379

Browse files
committed
Merge branch 'jk/attributes-path-doc'
Doc update. * jk/attributes-path-doc: doc/gitattributes: mention non-recursive behavior
2 parents d178111 + b635ed9 commit d16c379

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Documentation/gitattributes.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,16 @@ Unspecified::
5656

5757
When more than one pattern matches the path, a later line
5858
overrides an earlier line. This overriding is done per
59-
attribute. The rules how the pattern matches paths are the
60-
same as in `.gitignore` files; see linkgit:gitignore[5].
61-
Unlike `.gitignore`, negative patterns are forbidden.
59+
attribute.
60+
61+
The rules by which the pattern matches paths are the same as in
62+
`.gitignore` files (see linkgit:gitignore[5]), with a few exceptions:
63+
64+
- negative patterns are forbidden
65+
66+
- patterns that match a directory do not recursively match paths
67+
inside that directory (so using the trailing-slash `path/` syntax is
68+
pointless in an attributes file; use `path/**` instead)
6269

6370
When deciding what attributes are assigned to a path, Git
6471
consults `$GIT_DIR/info/attributes` file (which has the highest

0 commit comments

Comments
 (0)