Search in sources :

Example 1 with VcsLogHashFilterImpl

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());
}
Also used : VcsLogHashFilterImpl(com.intellij.vcs.log.impl.VcsLogHashFilterImpl) VcsLogFilterCollectionBuilder(com.intellij.vcs.log.impl.VcsLogFilterCollectionImpl.VcsLogFilterCollectionBuilder)

Aggregations

VcsLogFilterCollectionBuilder (com.intellij.vcs.log.impl.VcsLogFilterCollectionImpl.VcsLogFilterCollectionBuilder)1 VcsLogHashFilterImpl (com.intellij.vcs.log.impl.VcsLogHashFilterImpl)1