private Set<String> includedIn(final Collection<RevCommit> tips,int limit) throws IOException, MissingObjectException, IncorrectObjectTypeException {
  Set<String> result=new HashSet<>();
  for (  RevCommit tip : tips) {
    boolean commitFound=false;
    rw.resetRetain(RevFlag.UNINTERESTING,containsTarget);
    rw.markStart(tip);
    for (    RevCommit commit : rw) {
      if (commit.equals(target) || commit.has(containsTarget)) {
        commitFound=true;
        tip.add(containsTarget);
        result.addAll(commitToRef.get(tip));
        break;
      }
    }
    if (!commitFound) {
      rw.markUninteresting(tip);
    }
 else     if (0 < limit && limit < result.size()) {
      break;
    }
  }
  return result;
}

private Set < String > includedIn ( final Collection < RevCommit > tips , int limit ) throws IOException , MissingObjectException , IncorrectObjectTypeException { Set < String > result = new HashSet < > ( ) ; for ( RevCommit tip : tips ) { boolean commitFound = false ; rw . resetRetain ( RevFlag . UNINTERESTING , containsTarget ) ; rw . markStart ( tip ) ; for ( RevCommit commit : rw ) { if ( commit . equals ( target ) || commit . has ( containsTarget ) ) { commitFound = true ; tip . add ( containsTarget ) ; result . addAll ( commitToRef . get ( tip ) ) ; break ; } } if ( ! commitFound ) { rw . markUninteresting ( tip ) ; } else if ( 0 < limit && limit < result . size ( ) ) { break ; } } return result ; }
resolves which tip refs include the target commit .
