docs: protected int distanceBetween(@Nonnull Repository repo, @Nonnull RevCommit child, @Nonnull RevCommit parent) {
      try (RevWalk revWalk = new RevWalk(repo)) {
        revWalk.markStart(child);
  
        Set<ObjectId> seena = new HashSet<>();
        Set<ObjectId> seenb = new HashSet<>();
        Queue<RevCommit> q = new ArrayDeque<>();
  
        q.add(revWalk.parseCommit(child));
        int distance = 0;
        ObjectId parentId = parent.getId();
  
        while (q.size() > 0) {
          RevCommit commit = q.remove();
          ObjectId commitId = commit.getId();
  
          if (seena.contains(commitId)) {
            continue;
          }
          seena.add(commitId);
  
          if (parentId.equals(commitId)) {
            // don't consider commits that are included in this commit
            seeAllParents(revWalk, commit, seenb);
            // remove things we shouldn't have included
            for (ObjectId oid : seenb) {
              if (seena.contains(oid)) {
                distance--;
              }
            }
            seena.addAll(seenb);
            continue;
          }
  
          for (ObjectId oid : commit.getParents()) {
            if (!seena.contains(oid)) {
              q.add(revWalk.parseCommit(oid));
            }
          }
          distance++;
        }
        return distance;
      } catch (Exception e) {
        throw new RuntimeException(String.format("Unable to calculate distance between [%s] and [%s]", child, parent), e);
      }
    }