diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2013-02-28 23:47:44 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2014-01-19 00:20:42 +0100 |
commit | 75b31767c4d5db4883aa9b86c104d3cc8aa72b6d (patch) | |
tree | 3cc9c39447f7f3476b7419bfb30b078cac9e8281 /org.eclipse.jgit | |
parent | 2f425cf30c79917a93eeeac0ee3fcfc7af77d203 (diff) | |
download | jgit-75b31767c4d5db4883aa9b86c104d3cc8aa72b6d.tar.gz jgit-75b31767c4d5db4883aa9b86c104d3cc8aa72b6d.zip |
Do not report ignored directories as untracked
Change-Id: I7e3f6b9fb1ac4b99d2cc9a78c63aad86f4fa5744
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
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()); |