summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorDuy Nguyen <pclouds@gmail.com>2018-02-01 16:59:15 +0700
committerJunio C Hamano <gitster@pobox.com>2018-02-02 10:56:46 -0800
commit2e22a85e5c01d041434682fe75f58be94de0801b (patch)
tree1f002fa00d0fed28a9fbc37f13d29fdc531e2db3 /Documentation
parentfc849d8d6b90e5c1e0c37bc0d60dd92b2fe7347f (diff)
downloadgit-2e22a85e5c01d041434682fe75f58be94de0801b.tar.gz
gitignore.txt: elaborate shell glob syntaxnd/ignore-glob-doc-update
`fnmatch(3)` is a great mention if the intended audience is programmers. For normal users it's probably better to spell out what a shell glob is. This paragraph is updated to roughly tell (or remind) what the main wildcards are supposed to do. All the details are still hidden away behind the `fnmatch(3)` wall because bringing the whole specification here may be too much. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitignore.txt11
1 files changed, 5 insertions, 6 deletions
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index 63260f0056..ff5d7f9ed6 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -102,12 +102,11 @@ PATTERN FORMAT
(relative to the toplevel of the work tree if not from a
`.gitignore` file).
- - Otherwise, Git treats the pattern as a shell glob suitable
- for consumption by fnmatch(3) with the FNM_PATHNAME flag:
- wildcards in the pattern will not match a / in the pathname.
- For example, "Documentation/{asterisk}.html" matches
- "Documentation/git.html" but not "Documentation/ppc/ppc.html"
- or "tools/perf/Documentation/perf.html".
+ - Otherwise, Git treats the pattern as a shell glob: "`*`" matches
+ anything except "`/`", "`?`" matches any one character except "`/`"
+ and "`[]`" matches one character in a selected range. See
+ fnmatch(3) and the FNM_PATHNAME flag for a more detailed
+ description.
- A leading slash matches the beginning of the pathname.
For example, "/{asterisk}.c" matches "cat-file.c" but not