Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Aniszczyk2010-05-24 15:09:21 +0000
committerChris Aniszczyk2010-05-24 15:09:21 +0000
commitee7102ae080ab23043392ddeee8c307e12e52708 (patch)
treea0a58f68a93bf878b7aa9df892ebeb89ef7e3540
parent567f2c0ef7e710482fe8d3e2bd2bd0079c1d6132 (diff)
downloadegit-ee7102ae080ab23043392ddeee8c307e12e52708.tar.gz
egit-ee7102ae080ab23043392ddeee8c307e12e52708.tar.xz
egit-ee7102ae080ab23043392ddeee8c307e12e52708.zip
Handle InvalidMergeHeadsException
Change-Id: Idfbaca9dd585dd837478c39ffd385c53980bf9f1 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java
index 8000675aff..b79dcfe4b7 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/MergeOperation.java
@@ -26,6 +26,7 @@ import org.eclipse.egit.core.internal.util.ProjectUtil;
import org.eclipse.jgit.api.CheckoutConflictException;
import org.eclipse.jgit.api.ConcurrentRefUpdateException;
import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.InvalidMergeHeadsException;
import org.eclipse.jgit.api.MergeCommand;
import org.eclipse.jgit.api.MergeResult;
import org.eclipse.jgit.api.NoHeadException;
@@ -100,6 +101,8 @@ public class MergeOperation implements IEGitOperation {
throw new TeamException(CoreText.MergeOperation_MergeFailedRefUpdate, e);
} catch (CheckoutConflictException e) {
throw new TeamException(e.getLocalizedMessage(), e.getCause());
+ } catch (InvalidMergeHeadsException e) {
+ throw new TeamException(e.getLocalizedMessage(), e.getCause());
}
ProjectUtil.refreshProjects(repository, new SubProgressMonitor(
mymonitor, 1));

Back to the top