@NotNull
  private static Map<VirtualFile, List<Hash>> groupByRoot(@NotNull List<? extends CommitId> details) {
    Map<VirtualFile, List<Hash>> result = new HashMap<>();
    for (CommitId commit : details) {
      List<Hash> hashes = result.get(commit.getRoot());
      if (hashes == null) {
        hashes = new ArrayList<>();
        result.put(commit.getRoot(), hashes);
      }
      hashes.add(commit.getHash());
    }
    return result;
  }
@NotNull
  private static Map<VirtualFile, List<Hash>> groupByRoot(@NotNull List<? extends CommitId> details)