if (head == null || head.getObjectId() == null)
return; // throw exception?
if (head.getName().startsWith(Constants.R_HEADS)) {
final RefUpdate newHead = repo.updateRef(Constants.HEAD);
newHead.disableRefLog();
newHead.link(head.getName());
addMergeConfig(repo, head);
}
final RevCommit commit = parseCommit(repo, head);