Collection<VirtualFile> (@NotNull Collection<? extends Repository> repositories) { List<VirtualFile> invalidRepos = new ArrayList<>(); for (Repository repo : repositories) { VcsRoot vcsRoot = myVcsManager.getVcsRootObjectFor(repo.getRoot()); if (vcsRoot == null || !repo.getRoot().equals(vcsRoot.getPath()) || !repo.getVcs().equals(vcsRoot.getVcs())) { invalidRepos.add(repo.getRoot()); } } return invalidRepos; }