DataPack (@NotNull List<? extends GraphCommit<Integer>> commits, @NotNull Map<VirtualFile, CompressedRefs> refs, @NotNull Map<VirtualFile, VcsLogProvider> providers, @NotNull VcsLogStorage storage, boolean full) { RefsModel refsModel; PermanentGraph<Integer> permanentGraph; if (commits.isEmpty()) { refsModel = new RefsModel(refs, new HashSet<>(), storage, providers); permanentGraph = EmptyPermanentGraph.getInstance(); } else { refsModel = new RefsModel(refs, getHeads(commits), storage, providers); Comparator<Integer> headCommitdComparator = new HeadCommitsComparator(refsModel, getRefManagerMap(providers), VcsLogStorageImpl.createHashGetter(storage)); Set<Integer> branches = getBranchCommitHashIndexes(refsModel.getBranches(), storage); permanentGraph = computeWithSpan(TelemetryManager.getInstance().getTracer(VcsScopeKt.VcsScope), LogData.BuildingGraph.getName(), (span) -> { return PermanentGraphImpl.newInstance(commits, new GraphColorManagerImpl(refsModel), headCommitdComparator, branches); }); } return new DataPack(refsModel, permanentGraph, providers, full); }