private static boolean putRevision(@NotNull Project project,
                                     @NotNull MultiMap<Pair<GitRevisionNumber, VirtualFile>, FilePath> map,
                                     @Nullable ContentRevision revision) {
    if (revision == null) return true;
    if (!(revision instanceof GitContentRevision)) return false;

    FilePath filePath = revision.getFile();
    GitRevisionNumber number = (GitRevisionNumber)revision.getRevisionNumber();

    VcsRoot vcsRoot = ProjectLevelVcsManager.getInstance(project).getVcsRootObjectFor(filePath);
    if (vcsRoot == null || vcsRoot.getVcs() == null) return false;
    if (!GitVcs.getKey().equals(vcsRoot.getVcs().getKeyInstanceMethod())) return false;

    map.putValue(Pair.create(number, vcsRoot.getPath()), filePath);
    return true;
  }
private static boolean putRevision(@NotNull Project project,
                                     @NotNull MultiMap<Pair<GitRevisionNumber, VirtualFile>, FilePath> map,
                                     @Nullable ContentRevision revision)