Skip to content

Commit 34f6f0e

Browse files
committed
Merge branch 'nd/ignore-glob-doc-update' into maint
Doc update. * nd/ignore-glob-doc-update: gitignore.txt: elaborate shell glob syntax
2 parents fda2326 + 2e22a85 commit 34f6f0e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Documentation/gitignore.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,11 @@ PATTERN FORMAT
102102
(relative to the toplevel of the work tree if not from a
103103
`.gitignore` file).
104104

105-
- Otherwise, Git treats the pattern as a shell glob suitable
106-
for consumption by fnmatch(3) with the FNM_PATHNAME flag:
107-
wildcards in the pattern will not match a / in the pathname.
108-
For example, "Documentation/{asterisk}.html" matches
109-
"Documentation/git.html" but not "Documentation/ppc/ppc.html"
110-
or "tools/perf/Documentation/perf.html".
105+
- Otherwise, Git treats the pattern as a shell glob: "`*`" matches
106+
anything except "`/`", "`?`" matches any one character except "`/`"
107+
and "`[]`" matches one character in a selected range. See
108+
fnmatch(3) and the FNM_PATHNAME flag for a more detailed
109+
description.
111110

112111
- A leading slash matches the beginning of the pathname.
113112
For example, "/{asterisk}.c" matches "cat-file.c" but not

0 commit comments

Comments
 (0)