Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java
index b5cb00da27..4489ea1eca 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java
@@ -33,7 +33,7 @@ import org.eclipse.jgit.api.CheckoutResult.Status;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.JGitInternalException;
-import org.eclipse.jgit.errors.CheckoutConflictException;
+import org.eclipse.jgit.api.errors.CheckoutConflictException;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
@@ -101,16 +101,10 @@ public class BranchOperation extends BaseOperation {
try {
co.call();
+ } catch (CheckoutConflictException e) {
+ return;
} catch (JGitInternalException e) {
- // TODO replace this with API exception
- // org.eclipse.jgit.api.errors.CheckoutConflictException
- // as soon as http://egit.eclipse.org/r/#change,4178 has
- // been accepted (bug 369303 tracks this)
- if (e.getCause() instanceof CheckoutConflictException)
- return;
- else
- throw new CoreException(Activator.error(e.getMessage(),
- e));
+ throw new CoreException(Activator.error(e.getMessage(), e));
} catch (GitAPIException e) {
throw new CoreException(Activator.error(e.getMessage(), e));
} finally {

Back to the top