summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-05 22:54:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-05 22:54:11 (GMT)
commit9496acc1449e3e536f50eed081df0702b54cf0a8 (patch)
tree1a94ab2ee21a8ea42e2fcf0862676e7983013125 /Documentation
parent90b99869d4ab750b7de0250f02d4c3f08c86f61b (diff)
parent8c722360d1277259d4baec951e1488086f775214 (diff)
downloadgit-9496acc1449e3e536f50eed081df0702b54cf0a8.zip
git-9496acc1449e3e536f50eed081df0702b54cf0a8.tar.gz
git-9496acc1449e3e536f50eed081df0702b54cf0a8.tar.bz2
Merge branch 'nd/exclusion-regression-fix' into maint
The ignore mechanism saw a few regressions around untracked file listing and sparse checkout selection areas in 2.7.0; the change that is responsible for the regression has been reverted. * nd/exclusion-regression-fix: Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitignore.txt23
1 files changed, 4 insertions, 19 deletions
diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index 79a1948..473623d 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -82,12 +82,12 @@ PATTERN FORMAT
- An optional prefix "`!`" which negates the pattern; any
matching file excluded by a previous pattern will become
- included again.
+ included again. It is not possible to re-include a file if a parent
+ directory of that file is excluded. Git doesn't list excluded
+ directories for performance reasons, so any patterns on contained
+ files have no effect, no matter where they are defined.
Put a backslash ("`\`") in front of the first "`!`" for patterns
that begin with a literal "`!`", for example, "`\!important!.txt`".
- It is possible to re-include a file if a parent directory of that
- file is excluded if certain conditions are met. See section NOTES
- for detail.
- If the pattern ends with a slash, it is removed for the
purpose of the following description, but it would only find
@@ -141,21 +141,6 @@ not tracked by Git remain untracked.
To stop tracking a file that is currently tracked, use
'git rm --cached'.
-To re-include files or directories when their parent directory is
-excluded, the following conditions must be met:
-
- - The rules to exclude a directory and re-include a subset back must
- be in the same .gitignore file.
-
- - The directory part in the re-include rules must be literal (i.e. no
- wildcards)
-
- - The rules to exclude the parent directory must not end with a
- trailing slash.
-
- - The rules to exclude the parent directory must have at least one
- slash.
-
EXAMPLES
--------