just a comment: I thought a little bit whether it is ok to report a non-null newHead here. This merge command didn't do a new commit and also didn't touched HEAD - so why should it report something in newHead. Failing merges also report null as newHead But: in the ALREADY_UP_TO_DATE case we also report the old HEAD as newHead. Also javadocs for MergeResult.getNewHead() vote for youre proposal. So, ok for me.