List<GitRepository> (@NotNull Collection<GitRepository> changesRepositories, @NotNull Collection<VcsRoot> noChangesRoots) { GitRepositoryManager repositoryManager = getRepositoryManager(myProject); GitVcs vcs = GitVcs.getInstance(myProject); Collection<GitRepository> noChangesRepositories = getRepositoriesFromRoots(repositoryManager, mapNotNull(noChangesRoots, it -> it.getVcs() == vcs ? it.getPath() : null)); return repositoryManager.sortByDependency(union(changesRepositories, noChangesRepositories)); }