diff options
| author | Tomasz Zarna | 2012-03-09 16:07:09 +0000 |
|---|---|---|
| committer | Dariusz Luksza | 2012-03-10 17:13:32 +0000 |
| commit | 3ee608f8e0cbd324b4fb686bc23d94968160eafd (patch) | |
| tree | a81ab157390c06158842e348c0697827007603a4 | |
| parent | fa6df0762a3f0356df678868772fd8b57b7f31b5 (diff) | |
| download | egit-3ee608f8e0cbd324b4fb686bc23d94968160eafd.tar.gz egit-3ee608f8e0cbd324b4fb686bc23d94968160eafd.tar.xz egit-3ee608f8e0cbd324b4fb686bc23d94968160eafd.zip | |
Cleanup CheckoutConflictException when JGit API has been fixed
Bug: 369303
Change-Id: I8e5cf15699d71aea5fbeaee4ed616ad670675183
| -rw-r--r-- | org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java | 14 |
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 { |
