Browse Source

Expose unmerged paths when revert fails

Change-Id: I02678aeb31a62668ae2b0342a6dae721e043dc5e
stable-1.2
Kevin Sawicki 13 years ago committed by Matthias Sohn
parent
commit
52507ee2e7
  1. 10
      org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java

10
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;
}
}

Loading…
Cancel
Save