void (final @NotNull String name, @NotNull List<? extends GitRepository> repositories) { updateInfo(repositories); repositories = ContainerUtil.filter(repositories, repository -> { GitLocalBranch currentBranch = repository.getCurrentBranch(); return currentBranch == null || !currentBranch.getName().equals(name); }); if (!repositories.isEmpty()) { new GitCheckoutNewBranchOperation(myProject, myGit, myUiHandler, repositories, name).execute(); } else { LOG.error("Creating new branch the same as current in all repositories: " + name); } }