in src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java [203:225]
private void markUninteresting(Repository git, String branch, RevWalk rw, ObjectId oldObjectId)
throws IOException {
for (Ref r : git.getRefDatabase().getRefs()) {
try {
if (r.getName().equals(branch)) {
if (!ObjectId.zeroId().equals(oldObjectId)) {
// For the updated branch the oldObjectId is the tip of uninteresting
// commit history
rw.markUninteresting(rw.parseCommit(oldObjectId));
}
} else if (r.getName().startsWith(Constants.R_HEADS)
|| r.getName().startsWith(Constants.R_TAGS)) {
rw.markUninteresting(rw.parseCommit(r.getObjectId()));
}
} catch (IncorrectObjectTypeException e) {
// skip if not parseable as a commit
} catch (MissingObjectException e) {
// skip if not parseable as a commit
} catch (IOException e) {
// skip if not parseable as a commit
}
}
}