for (final Ref ref : refs.values()) {
RevObject o = ow.parseAny(ref.getObjectId());
ow.markUninteresting(o);
if (checkReferencedIsReachable && !baseObjects.isEmpty()) {
o = ow.peel(o);
if (o instanceof RevCommit)
o = ((RevCommit) o).getTree();
if (o instanceof RevTree)
ow.markUninteresting(o);
}