summaryrefslogtreecommitdiff
path: root/Documentation/gitignore.txt
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-10-15 06:26:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-10-15 21:58:19 (GMT)
commit237ec6e40d4fd1a0190c4ffde6d18278abc5853a (patch)
tree05364964ea6cb8f76ff212ab6548f2f5bc2fc83b /Documentation/gitignore.txt
parent4c251e5cb5c245ee3bb98c7cedbe944df93e45f4 (diff)
downloadgit-237ec6e40d4fd1a0190c4ffde6d18278abc5853a.zip
git-237ec6e40d4fd1a0190c4ffde6d18278abc5853a.tar.gz
git-237ec6e40d4fd1a0190c4ffde6d18278abc5853a.tar.bz2
Support "**" wildcard in .gitignore and .gitattributes
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/gitignore.txt')
-rw-r--r--Documentation/gitignore.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index 2e7328b..d4747ce 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -96,6 +96,25 @@ PATTERN FORMAT
For example, "/{asterisk}.c" matches "cat-file.c" but not
"mozilla-sha1/sha1.c".
+Two consecutive asterisks ("`**`") in patterns matched against
+full pathname may have special meaning:
+
+ - A leading "`**`" followed by a slash means match in all
+ directories. For example, "`**/foo`" matches file or directory
+ "`foo`" anywhere, the same as pattern "`foo`". "**/foo/bar"
+ matches file or directory "`bar`" anywhere that is directly
+ under directory "`foo`".
+
+ - A trailing "/**" matches everything inside. For example,
+ "abc/**" matches all files inside directory "abc", relative
+ to the location of the `.gitignore` file, with infinite depth.
+
+ - A slash followed by two consecutive asterisks then a slash
+ matches zero or more directories. For example, "`a/**/b`"
+ matches "`a/b`", "`a/x/b`", "`a/x/y/b`" and so on.
+
+ - Other consecutive asterisks are considered invalid.
+
NOTES
-----