diff options
Diffstat (limited to 'org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/GitFlowOperation.java')
-rw-r--r-- | org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/GitFlowOperation.java | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/GitFlowOperation.java b/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/GitFlowOperation.java index 5a33c3c95d..efe1db6e7c 100644 --- a/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/GitFlowOperation.java +++ b/org.eclipse.egit.gitflow/src/org/eclipse/egit/gitflow/op/GitFlowOperation.java @@ -51,6 +51,12 @@ abstract public class GitFlowOperation implements IEGitOperation { protected GitFlowRepository repository; /** + * the status of the latest merge from this operation + */ + // TODO: Remove from this class. Not all GitFlow operations involve a merge + protected MergeResult mergeResult; + + /** * @param repository */ public GitFlowOperation(GitFlowRepository repository) { @@ -96,16 +102,15 @@ abstract public class GitFlowOperation implements IEGitOperation { * * @param monitor * @param branchName - * @return result of merging back to develop branch * @throws CoreException */ - protected MergeResult finish(IProgressMonitor monitor, String branchName) + protected void finish(IProgressMonitor monitor, String branchName) throws CoreException { try { - MergeResult mergeResult = mergeTo(monitor, branchName, + mergeResult = mergeTo(monitor, branchName, repository.getConfig().getDevelop()); if (!mergeResult.getMergeStatus().isSuccessful()) { - return mergeResult; + return; } Ref branch = repository.findBranch(branchName); @@ -115,8 +120,6 @@ abstract public class GitFlowOperation implements IEGitOperation { } new DeleteBranchOperation(repository.getRepository(), branch, false) .execute(monitor); - - return mergeResult; } catch (IOException e) { throw new RuntimeException(e); } @@ -171,4 +174,12 @@ abstract public class GitFlowOperation implements IEGitOperation { fetchOperation.run(monitor); return fetchOperation.getOperationResult(); } + + /** + * @return The result of the merge this operation performs. May be null, if + * no merge was performed. + */ + public MergeResult getMergeResult() { + return mergeResult; + } } |