static @Nullable GitRepository getRepository(@NotNull GitRepositoryManager manager, @NotNull VirtualFile root) {
    GitRepository repository = manager.getRepositoryForRoot(root);
    if (repository == null) {
      LOG.warn("Repository not found for root " + root);
      return null;
    }
    else if (repository.isFresh()) {
      LOG.info("Fresh repository: " + root);
      return null;
    }
    return repository;
  }
static @Nullable GitRepository getRepository(@NotNull GitRepositoryManager manager, @NotNull VirtualFile root)