private static @NotNull Collection<VirtualFile> getUnmergedFiles(@NotNull Project project,
                                                                   @NotNull VirtualFile root) throws VcsException {
    GitRepository repository = GitRepositoryManager.getInstance(project).getRepositoryForRoot(root);
    if (repository == null) {
      LOG.error("Repository not found for root " + root);
      return Collections.emptyList();
    }

    List<FilePath> files = GitChangeUtils.getUnmergedFiles(repository);
    return ContainerUtil.mapNotNull(files, it -> LocalFileSystem.getInstance().refreshAndFindFileByPath(it.getPath()));
  }
private static @NotNull Collection<VirtualFile> getUnmergedFiles(@NotNull Project project,
                                                                   @NotNull VirtualFile root)