Merge branch 'nd/exclusion-regression-fix'
Another try to add support to the ignore mechanism that lets you say "this is excluded" and then later say "oh, no, this part (that is a subset of the previous part) is not excluded". * nd/exclusion-regression-fix: dir.c: don't exclude whole dir prematurely dir.c: support marking some patterns already matched dir.c: support tracing exclude dir.c: fix match_pathname()
This commit is contained in:
@ -114,6 +114,7 @@ SEE ALSO
|
||||
linkgit:gitignore[5]
|
||||
linkgit:gitconfig[5]
|
||||
linkgit:git-ls-files[1]
|
||||
GIT_TRACE_EXCLUDE in linkgit:git[1]
|
||||
|
||||
GIT
|
||||
---
|
||||
|
@ -1065,6 +1065,11 @@ of clones and fetches.
|
||||
cloning of shallow repositories.
|
||||
See 'GIT_TRACE' for available trace output options.
|
||||
|
||||
'GIT_TRACE_EXCLUDE'::
|
||||
Enables trace messages that can help debugging .gitignore
|
||||
processing. See 'GIT_TRACE' for available trace output
|
||||
options.
|
||||
|
||||
'GIT_LITERAL_PATHSPECS'::
|
||||
Setting this variable to `1` will cause Git to treat all
|
||||
pathspecs literally, rather than as glob patterns. For example,
|
||||
|
@ -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. 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.
|
||||
included again.
|
||||
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,6 +141,15 @@ 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)
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
||||
|
Reference in New Issue
Block a user