diff options
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java index 1b231cce9d..c3323b8684 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java @@ -132,6 +132,7 @@ public class IndexDiffFilter extends TreeFilter { IncorrectObjectTypeException, IOException { final int cnt = tw.getTreeCount(); final int wm = tw.getRawMode(workingTree); + WorkingTreeIterator wi = workingTree(tw); String path = tw.getPathString(); DirCacheIterator di = tw.getTree(dirCache, DirCacheIterator.class); @@ -148,7 +149,8 @@ public class IndexDiffFilter extends TreeFilter { // contain only untracked files and add it to // untrackedParentFolders. If we later find tracked files we will // remove it from this list - if (FileMode.TREE.equals(wm)) { + if (FileMode.TREE.equals(wm) + && !(honorIgnores && wi.isEntryIgnored())) { // Clean untrackedParentFolders. This potentially moves entries // from untrackedParentFolders to untrackedFolders copyUntrackedFolders(path); @@ -179,7 +181,6 @@ public class IndexDiffFilter extends TreeFilter { // we can avoid returning a result here, but only if its not in any // other tree. final int dm = tw.getRawMode(dirCache); - WorkingTreeIterator wi = workingTree(tw); if (dm == FileMode.TYPE_MISSING) { if (honorIgnores && wi.isEntryIgnored()) { ignoredPaths.add(wi.getEntryPathString()); |