if (revWalk.isMergedInto(srcTip, branchTip)) {
// already merged
return new MergeResult(MergeStatus.ALREADY_MERGED, null);
}
RecursiveMerger merger = (RecursiveMerger) MergeStrategy.RECURSIVE.newMerger(repository, true);
boolean merged = merger.merge(branchTip, srcTip);
if (merged) {
// create a merge commit and a reference to track the merge commit
ObjectId treeId = merger.getResultTreeId();
ObjectInserter odi = repository.newObjectInserter();
try {