Expose unmerged paths when revert fails

Change-Id: I02678aeb31a62668ae2b0342a6dae721e043dc5e
This commit is contained in:
Kevin Sawicki 2011-12-14 14:30:00 -08:00 committed by Matthias Sohn
parent 0ca105a502
commit 52507ee2e7
1 changed files with 10 additions and 0 deletions

View File

@ -86,6 +86,8 @@ public class RevertCommand extends GitCommand<RevCommit> {
private MergeResult failingResult;
private List<String> unmergedPaths;
/**
* @param repo
*/
@ -160,6 +162,7 @@ public RevCommit call() throws GitAPIException {
.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 List<Ref> getRevertedRefs() {
public MergeResult getFailingResult() {
return failingResult;
}
/**
* @return the unmerged paths, will be null if no merge conflicts
*/
public List<String> getUnmergedPaths() {
return unmergedPaths;
}
}