public static boolean isMergedInto(Repository repository, ObjectId commitId, ObjectId tipCommitId) {
// traverse the revlog looking for a commit chain between the endpoints
RevWalk rw = new RevWalk(repository);
try {
// must re-lookup RevCommits to workaround undocumented RevWalk bug
RevCommit tip = rw.lookupCommit(tipCommitId);
RevCommit commit = rw.lookupCommit(commitId);
return rw.isMergedInto(commit, tip);
} catch (Exception e) {
LOGGER.error("Failed to determine isMergedInto", e);
} finally {