@Override
  @CalledInAny
  public @Nullable String getCurrentBranch(@NotNull VirtualFile root) {
    GitRepository repository = myRepositoryManager.getRepositoryForRootQuick(root);
    if (repository == null) return null;
    String currentBranchName = repository.getCurrentBranchName();
    if (currentBranchName == null && repository.getCurrentRevision() != null) {
      return GitUtil.HEAD;
    }
    return currentBranchName;
  }
@Override
  @CalledInAny
  public @Nullable String getCurrentBranch(@NotNull VirtualFile root)