summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorRobin Stocker <robin@nibor.org>2012-06-12 18:12:14 +0200
committerRobin Stocker <robin@nibor.org>2012-06-23 16:32:34 +0200
commit028434e4f58bfc154da2f56a68e7aefc220bb359 (patch)
tree18b72129bd3134b00789e91d4edf98dc12d15dd7 /org.eclipse.jgit
parent3c29bf094111308da2cea79fc36af1eff2f4da7a (diff)
downloadjgit-028434e4f58bfc154da2f56a68e7aefc220bb359.tar.gz
jgit-028434e4f58bfc154da2f56a68e7aefc220bb359.zip
Don't return success on failing paths in ResolveMerger
ResolveMerger#mergeImpl() was only returning false (= failed) when there were unmerged paths. In the case when there were only failing paths, it returned true. Because MergeCommand looks at the return value for determining if the merge failed, it would fall into the successful case there, where it should instead return a MergeResult with MergeStatus.FAILED. This change adds a test case for this and makes the ResolveMerger return false when there are failing paths. This was discovered while working on fixing bug 354099 and is needed for its test case. Bug: 354099 Change-Id: I499f518f6289ef93e017db924b2aa857f2154707 Signed-off-by: Robin Stocker <robin@nibor.org>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
index 7b1b36c946..6130cc72c8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
@@ -221,7 +221,7 @@ public class ResolveMerger extends ThreeWayMerger {
builder = null;
}
- if (getUnmergedPaths().isEmpty()) {
+ if (getUnmergedPaths().isEmpty() && !failed()) {
resultTree = dircache.writeTree(getObjectInserter());
return true;
} else {