diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-12-07 18:45:11 -0800 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-12-08 10:03:20 -0800 |
commit | 48e80698cf7b19422cb7a62a34170cc3c7a3f7a2 (patch) | |
tree | f3d4e7f22e51a2be552b9c5f848086060f4af553 | |
parent | ca9baa0ee2d86edf1c1e29ba3c35ba45fcf32b8c (diff) | |
download | jgit-48e80698cf7b19422cb7a62a34170cc3c7a3f7a2.tar.gz jgit-48e80698cf7b19422cb7a62a34170cc3c7a3f7a2.zip |
IndexDiff: Remove always true not-subtree check
The TreeWalk is configured to be recursive, which means subtrees are
never presented to the application. Therefore the working tree file
mode can never be a subtree/subdirectory at this point in the code.
Change-Id: Ie842ddc147957d09205c0d2ce87b25c566862fd9
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java index 489e5c0cee..f532cdcf10 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java @@ -191,7 +191,6 @@ public class IndexDiff { DirCacheIterator.class); WorkingTreeIterator workingTreeIterator = treeWalk.getTree(WORKDIR, WorkingTreeIterator.class); - FileMode fileModeTree = treeWalk.getFileMode(TREE); if (dirCacheIterator != null) { if (dirCacheIterator.getDirCacheEntry().isAssumeValid()) @@ -208,12 +207,10 @@ public class IndexDiff { } } else { // in repo, not in index => removed - if (!fileModeTree.equals(FileMode.TYPE_TREE)) { - removed.add(treeWalk.getPathString()); - changesExist = true; - if (workingTreeIterator != null) - untracked.add(treeWalk.getPathString()); - } + removed.add(treeWalk.getPathString()); + changesExist = true; + if (workingTreeIterator != null) + untracked.add(treeWalk.getPathString()); } } else { if (dirCacheIterator != null) { |