Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-12-14 17:30:00 -0500
committerMatthias Sohn2011-12-19 16:46:20 -0500
commit52507ee2e7a826adc7a3d37b3234f102754aa579 (patch)
tree83c0b2fab51a2b099688270c97f7b829dc096822
parent0ca105a502a5edb0abf1c344772426a6184f20cb (diff)
downloadjgit-52507ee2e7a826adc7a3d37b3234f102754aa579.tar.gz
jgit-52507ee2e7a826adc7a3d37b3234f102754aa579.tar.xz
jgit-52507ee2e7a826adc7a3d37b3234f102754aa579.zip
Expose unmerged paths when revert fails
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java
index 3475ed7d64..f058014f67 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java
@@ -86,6 +86,8 @@ public class RevertCommand extends GitCommand<RevCommit> {
private MergeResult failingResult;
+ private List<String> unmergedPaths;
+
/**
* @param repo
*/
@@ -160,6 +162,7 @@ public class RevertCommand extends GitCommand<RevCommit> {
.setReflogComment("revert: " + shortMessage).call();
revertedRefs.add(src);
} else {
+ unmergedPaths = merger.getUnmergedPaths();
Map<String, MergeFailureReason> failingPaths = merger
.getFailingPaths();
if (failingPaths != null)
@@ -232,4 +235,11 @@ public class RevertCommand extends GitCommand<RevCommit> {
public MergeResult getFailingResult() {
return failingResult;
}
+
+ /**
+ * @return the unmerged paths, will be null if no merge conflicts
+ */
+ public List<String> getUnmergedPaths() {
+ return unmergedPaths;
+ }
}

Back to the top