diff options
author | Max Hohenegger | 2019-12-15 16:16:55 +0000 |
---|---|---|
committer | Matthias Sohn | 2019-12-16 19:32:58 +0000 |
commit | d1b31c4f601f6aee33d03adf5c61c4918f020b9c (patch) | |
tree | fd68fb1e49d360ed1aba4acb98018c3a1594de2d /org.eclipse.egit.ui/src/org/eclipse | |
parent | e16db8b764b65adcadd8a0678cbc49c22d4186c6 (diff) | |
download | egit-d1b31c4f601f6aee33d03adf5c61c4918f020b9c.tar.gz egit-d1b31c4f601f6aee33d03adf5c61c4918f020b9c.tar.xz egit-d1b31c4f601f6aee33d03adf5c61c4918f020b9c.zip |
Fix false positive Error on Gitflow Branch Creation.
Bug 558336
Change-Id: If584a71ee654f454ea0d87aa04586b65489eeb1b
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse')
-rw-r--r-- | org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java index 14e4f3e986..02e4ee1355 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java @@ -428,7 +428,8 @@ public class BranchOperationUI { public static void handleSingleRepositoryCheckoutOperationResult( Repository repository, CheckoutResult result, String target) { - if (result.getStatus() == CheckoutResult.Status.CONFLICTS) { + switch (result.getStatus()) { + case CONFLICTS: PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); @@ -440,7 +441,8 @@ public class BranchOperationUI { .start(); } }); - } else if (result.getStatus() == CheckoutResult.Status.NONDELETED) { + break; + case NONDELETED: // double-check if the files are still there boolean show = false; List<String> pathList = result.getUndeletedList(); @@ -459,7 +461,11 @@ public class BranchOperationUI { new NonDeletedFilesDialog(shell, repository, result.getUndeletedList()).open(); }); - } else { + break; + case OK: + return; + case NOT_TRIED: + case ERROR: String repoName = Activator.getDefault().getRepositoryUtil() .getRepositoryName(repository); String message = NLS.bind( |