diff options
author | Bernard Leach <leachbj@bouncycastle.org> | 2011-04-29 19:42:10 +1000 |
---|---|---|
committer | Chris Aniszczyk <caniszczyk@gmail.com> | 2011-05-05 13:48:57 -0500 |
commit | 298486a7c320629de12f9506e0133686a7382b01 (patch) | |
tree | 4a3f545edd4fb769f89d33b4d071233a4da17d41 /org.eclipse.jgit/src/org/eclipse/jgit/lib | |
parent | e435f7de7748081945b02a0896dc54f4d6cc053c (diff) | |
download | jgit-298486a7c320629de12f9506e0133686a7382b01.tar.gz jgit-298486a7c320629de12f9506e0133686a7382b01.zip |
IndexDiff: conflicting files aren't properly shown
Before this change any files in the conflicting set would
also be listed in the the other IndexDiff Sets which is
confusing. With this change a conflicting file will not
be included in any of the other sets.
Change-Id: Ife9f2652685220bcfddc1f9820423acdcd5acfdc
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java | 15 |
1 files changed, 9 insertions, 6 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 b2c05ae5f7..0b23b23bdd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java @@ -286,6 +286,15 @@ public class IndexDiff { WorkingTreeIterator workingTreeIterator = treeWalk.getTree(WORKDIR, WorkingTreeIterator.class); + if (dirCacheIterator != null) { + final DirCacheEntry dirCacheEntry = dirCacheIterator + .getDirCacheEntry(); + if (dirCacheEntry != null && dirCacheEntry.getStage() > 0) { + conflicts.add(treeWalk.getPathString()); + continue; + } + } + if (treeIterator != null) { if (dirCacheIterator != null) { if (!treeIterator.idEqual(dirCacheIterator) @@ -324,12 +333,6 @@ public class IndexDiff { modified.add(treeWalk.getPathString()); } } - - final DirCacheEntry dirCacheEntry = dirCacheIterator - .getDirCacheEntry(); - if (dirCacheEntry != null && dirCacheEntry.getStage() > 0) { - conflicts.add(treeWalk.getPathString()); - } } } |