aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2012-03-09 11:07:09 (EST)
committerDariusz Luksza2012-03-10 12:13:32 (EST)
commit3ee608f8e0cbd324b4fb686bc23d94968160eafd (patch)
treea81ab157390c06158842e348c0697827007603a4
parentfa6df0762a3f0356df678868772fd8b57b7f31b5 (diff)
downloadegit-3ee608f8e0cbd324b4fb686bc23d94968160eafd.zip
egit-3ee608f8e0cbd324b4fb686bc23d94968160eafd.tar.gz
egit-3ee608f8e0cbd324b4fb686bc23d94968160eafd.tar.bz2
Cleanup CheckoutConflictException when JGit API has been fixed refs/changes/10/5310/2
-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 b5cb00d..4489ea1 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 {