GitRebaseSpec (@NotNull Project project, @NotNull GitRebaseParams params, @NotNull Collection<? extends GitRepository> repositories, @NotNull ProgressIndicator indicator) { GitUtil.updateRepositories(repositories); Map<GitRepository, String> initialHeadPositions = findInitialHeadPositions(repositories, params.getBranch()); Map<GitRepository, String> initialBranchNames = findInitialBranchNames(repositories); Map<GitRepository, GitRebaseStatus> initialStatusMap = new TreeMap<>(DvcsUtil.REPOSITORY_COMPARATOR); for (GitRepository repository : repositories) { initialStatusMap.put(repository, GitRebaseStatus.notStarted()); } return new GitRebaseSpec(params, initialStatusMap, initialHeadPositions, initialBranchNames, newSaver(project, indicator), true); }