public static @Nullable GitRepository getRepositoryForRootOrLogError(@NotNull Project project, @NotNull VirtualFile root) {
    GitRepository repository = GitRepositoryManager.getInstance(project).getRepositoryForRoot(root);
    if (repository == null) LOG.error(new GitRepositoryNotFoundException(root));
    return repository;
  }
public static @Nullable GitRepository getRepositoryForRootOrLogError(@NotNull Project project, @NotNull VirtualFile root)