summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-21 12:40:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-06-21 12:40:53 (GMT)
commitb17847884ff7c122621123d4a3e0e65f046b07a8 (patch)
tree3b2e111d18682317f65518d6e46628cb0e93cd4f /Documentation
parent065a652d6452c84efc8d1fbe8636ab8aeae5348e (diff)
parent81c13fde379c46cad6b6e4a03ed7ee4f686c030f (diff)
downloadgit-b17847884ff7c122621123d4a3e0e65f046b07a8.zip
git-b17847884ff7c122621123d4a3e0e65f046b07a8.tar.gz
git-b17847884ff7c122621123d4a3e0e65f046b07a8.tar.bz2
Merge branch 'jn/maint-doc-ignore' into maint
* jn/maint-doc-ignore: gitignore.5: Clarify matching rules
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitignore.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index 98c459d..e10fa88 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -83,16 +83,20 @@ Patterns have the following format:
- If the pattern does not contain a slash '/', git treats it as
a shell glob pattern and checks for a match against the
- pathname without leading directories.
+ pathname relative to the location of the `.gitignore` file
+ (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/\*.html" matches
- "Documentation/git.html" but not
- "Documentation/ppc/ppc.html". A leading slash matches the
- beginning of the pathname; for example, "/*.c" matches
- "cat-file.c" but not "mozilla-sha1/sha1.c".
+ "Documentation/git.html" but not "Documentation/ppc/ppc.html"
+ or "tools/perf/Documentation/perf.html".
+
+ - A leading slash matches the beginning of the pathname.
+ For example, "/*.c" matches "cat-file.c" but not
+ "mozilla-sha1/sha1.c".
An example: