use of com.intellij.vcs.log.graph.impl.facade.PermanentGraphImpl in project intellij-community by JetBrains.
the class FileHistoryFilterer method getCurrentRow.
private int getCurrentRow(@NotNull DataPack pack, @NotNull VisibleGraph<Integer> visibleGraph, @NotNull IndexDataGetter.FileNamesData fileIndexData) {
PermanentGraph<Integer> permanentGraph = pack.getPermanentGraph();
if (permanentGraph instanceof PermanentGraphImpl) {
CompressedRefs refs = pack.getRefsModel().getAllRefsByRoot().get(myRoot);
Optional<VcsRef> headOptional = refs.streamBranches().filter(br -> br.getName().equals("HEAD")).findFirst();
if (headOptional.isPresent()) {
VcsRef head = headOptional.get();
assert head.getRoot().equals(myRoot);
return findAncestorRowAffectingFile((PermanentGraphImpl<Integer>) permanentGraph, head.getCommitHash(), visibleGraph, fileIndexData);
}
}
return -1;
}
Aggregations