@Nullable
  private MultiMap<Repo, Hash> groupFirstPackOfCommits(@NotNull Project project, @NotNull VcsLogCommitSelection selection) {
    MultiMap<Repo, CommitId> commitIds = groupCommits(project, ContainerUtil.getFirstItems(selection.getCommits(), MAX_SELECTED_COMMITS),
                                                      CommitId::getRoot);
    if (commitIds == null) return null;

    MultiMap<Repo, Hash> hashes = MultiMap.create();
    for (Map.Entry<Repo, Collection<CommitId>> entry: commitIds.entrySet()) {
      hashes.putValues(entry.getKey(), ContainerUtil.map(entry.getValue(), CommitId::getHash));
    }
    return hashes;
  }
@Nullable
  private MultiMap<Repo, Hash> groupFirstPackOfCommits(@NotNull Project project, @NotNull VcsLogCommitSelection selection)