diff --git a/plugins/git4idea/src/git4idea/branch/GitCheckoutOperation.java b/plugins/git4idea/src/git4idea/branch/GitCheckoutOperation.java index ca1974c9c31f..64077d856333 100644 --- a/plugins/git4idea/src/git4idea/branch/GitCheckoutOperation.java +++ b/plugins/git4idea/src/git4idea/branch/GitCheckoutOperation.java @@ -111,7 +111,10 @@ class GitCheckoutOperation extends GitBranchOperation { // get changes overwritten by checkout from the error message captured from Git List affectedChanges = GitUtil.convertPathsToChanges(repository, localChangesOverwrittenByCheckout.getRelativeFilePaths(), true); // get all other conflicting changes - Map> conflictingChangesInRepositories = collectLocalChangesOnAllOtherRepositories(repository); + // get changes in all other repositories (except those which already have succeeded) to avoid multiple dialogs proposing smart checkout + Map> conflictingChangesInRepositories = + collectLocalChangesConflictingWithBranch(myProject, getRemainingRepositoriesExceptGiven(repository), myPreviousBranch, myStartPointReference); + Set otherProblematicRepositories = conflictingChangesInRepositories.keySet(); List allConflictingRepositories = new ArrayList(otherProblematicRepositories); allConflictingRepositories.add(repository); @@ -156,13 +159,6 @@ class GitCheckoutOperation extends GitBranchOperation { } } - @NotNull - private Map> collectLocalChangesOnAllOtherRepositories(@NotNull final GitRepository currentRepository) { - // get changes in all other repositories (except those which already have succeeded) to avoid multiple dialogs proposing smart checkout - List remainingRepositories = getRemainingRepositoriesExceptGiven(currentRepository); - return collectLocalChangesConflictingWithBranch(myProject, remainingRepositories, myPreviousBranch, myStartPointReference); - } - @NotNull @Override protected String getRollbackProposal() {