aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
diff options
context:
space:
mode:
authorStefan Lay <stefan.lay@sap.com>2013-11-28 11:18:16 +0100
committerStefan Lay <stefan.lay@sap.com>2013-11-29 09:34:03 +0100
commitec0d78d0939ee8ce30bd349bd885186c13d3b645 (patch)
tree1c27d0624913027d87d65016259d795e8a2ed256 /org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
parent53616a85ef5621187d97af1097821be80db1d39a (diff)
downloadjgit-ec0d78d0939ee8ce30bd349bd885186c13d3b645.tar.gz
jgit-ec0d78d0939ee8ce30bd349bd885186c13d3b645.zip
Use static factory methods instead of overloaded constructors
Change-Id: Ib10e0798dcfb9f1b611caec393926c95eff4c2a2
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
index d077cff156..3bbac4a856 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
@@ -321,7 +321,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
}
return finishRebase(newHead, lastStepWasForward);
} catch (CheckoutConflictException cce) {
- return new RebaseResult(cce.getConflictingPaths());
+ return RebaseResult.conflicts(cce.getConflictingPaths());
} catch (IOException ioe) {
throw new JGitInternalException(ioe.getMessage(), ioe);
}
@@ -340,7 +340,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
RevCommit commitToPick = walk.parseCommit(ids.iterator().next());
if (shouldPick) {
if (monitor.isCancelled())
- return new RebaseResult(commitToPick, Status.STOPPED);
+ return RebaseResult.result(Status.STOPPED, commitToPick);
RebaseResult result = cherryPickCommit(commitToPick);
if (result != null)
return result;
@@ -403,8 +403,8 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
switch (cherryPickResult.getStatus()) {
case FAILED:
if (operation == Operation.BEGIN)
- return abort(new RebaseResult(
- cherryPickResult.getFailingPaths()));
+ return abort(RebaseResult.failed(cherryPickResult
+ .getFailingPaths()));
else
return stop(commitToPick, Status.STOPPED);
case CONFLICTING:
@@ -735,7 +735,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
// Remove cherry pick state file created by CherryPickCommand, it's not
// needed for rebase
repo.writeCherryPickHead(null);
- return new RebaseResult(commitToPick, status);
+ return RebaseResult.result(status, commitToPick);
}
String toAuthorScript(PersonIdent author) {