]> source.dussan.org Git - jgit.git/commit
Fix the handling of .git/info/exclude and core.excludesFile 38/194738/1
authorThomas Wolf <twolf@apache.org>
Fri, 15 Jul 2022 18:39:19 +0000 (20:39 +0200)
committerThomas Wolf <twolf@apache.org>
Fri, 15 Jul 2022 19:00:16 +0000 (21:00 +0200)
commita1ce9063fbcafbc306f40f6d384d48726de09da4
tree974277bee239bb942616887b2a95e36de8ecd566
parentffcb9513855765b960f4a0f3671b1cc253ea58e4
Fix the handling of .git/info/exclude and core.excludesFile

The RootIgnoreNode in a WorkingTreeIterator must _not_ add the rules
from .git/info/exclude or from the file designated by git config
core.excludesFile to the list of rules read from the root .gitignore.
These really must be separate nodes in a hierarchy, otherwise the
precedence rules from [1] are violated and the outcome is not the
same as in C git.

[1] https://git-scm.com/docs/gitignore

Bug: 580381
Change-Id: I57802ba7bbbe4f183504c882b6c77a78cc3a9b99
Signed-off-by: Thomas Wolf <twolf@apache.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/CGitIgnoreTest.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java