private @Nullable VcsRevisionNumber getCurrentRevision(@NotNull VirtualFile file) {
    GitRepository repository = GitRepositoryManager.getInstance(myProject).getRepositoryForFile(file);
    if (repository == null) return null;

    String currentRevision = repository.getCurrentRevision();
    if (currentRevision == null) return null;

    return new GitRevisionNumber(currentRevision);
  }
private @Nullable VcsRevisionNumber getCurrentRevision(@NotNull VirtualFile file)