use of com.intellij.vcs.log.impl.VcsLogHashFilterImpl in project intellij-community by JetBrains.
the class VcsLogFilterer method applyHashFilter.
private VisiblePack applyHashFilter(@NotNull DataPack dataPack, @NotNull Collection<String> hashes, @NotNull PermanentGraph.SortType sortType) {
final Set<Integer> indices = ContainerUtil.map2SetNotNull(hashes, partOfHash -> {
CommitId commitId = myStorage.findCommitId(new CommitIdByStringCondition(partOfHash));
return commitId != null ? myStorage.getCommitIndex(commitId.getHash(), commitId.getRoot()) : null;
});
VisibleGraph<Integer> visibleGraph = dataPack.getPermanentGraph().createVisibleGraph(sortType, null, indices);
return new VisiblePack(dataPack, visibleGraph, false, new VcsLogFilterCollectionBuilder().with(new VcsLogHashFilterImpl(hashes)).build());
}
Aggregations