From 52507ee2e7a826adc7a3d37b3234f102754aa579 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 14 Dec 2011 14:30:00 -0800 Subject: Expose unmerged paths when revert fails Change-Id: I02678aeb31a62668ae2b0342a6dae721e043dc5e --- org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 { private MergeResult failingResult; + private List unmergedPaths; + /** * @param repo */ @@ -160,6 +162,7 @@ public class RevertCommand extends GitCommand { .setReflogComment("revert: " + shortMessage).call(); revertedRefs.add(src); } else { + unmergedPaths = merger.getUnmergedPaths(); Map failingPaths = merger .getFailingPaths(); if (failingPaths != null) @@ -232,4 +235,11 @@ public class RevertCommand extends GitCommand { public MergeResult getFailingResult() { return failingResult; } + + /** + * @return the unmerged paths, will be null if no merge conflicts + */ + public List getUnmergedPaths() { + return unmergedPaths; + } } -- cgit v1.2.3