Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/BranchOperation.java18
1 files changed, 14 insertions, 4 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 da20c9f48..b8986d2b0 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
@@ -127,10 +127,20 @@ public class BranchOperation implements IEGitOperation {
SubMonitor progress = SubMonitor.convert(pm,
numberOfRepositories * 2);
for (Repository repository : repositories) {
- CheckoutResult result = checkoutRepository(repository,
- progress.newChild(1), numberOfRepositories > 1);
- if (result.getStatus() == Status.NONDELETED) {
- retryDelete(repository, result.getUndeletedList());
+ CheckoutResult result;
+ if (pm.isCanceled()) {
+ // don't break from the loop, the result map must be
+ // filled
+ result = CheckoutResult.NOT_TRIED_RESULT;
+ }
+ else {
+ result = checkoutRepository(repository,
+ progress.newChild(1),
+ numberOfRepositories > 1);
+ if (result.getStatus() == Status.NONDELETED) {
+ retryDelete(repository,
+ result.getUndeletedList());
+ }
}
results.put(repository, result);
}

Back to the top