@NotNull
 @Override
 public Set<CommitId> getContainingBranches(@NotNull CommitId commit) {
   int commitIndex = myPermanentCommitsInfo.getNodeId(commit);
   return myPermanentCommitsInfo.convertToCommitIdSet(
       myReachableNodes.getContainingBranches(commitIndex, myBranchNodeIds));
 }