Exit if merge fails; get the right branch.