Why are you setting the output variable to the first commit passed when we as yet have no idea what the merge base is and it's going to be overwritten by the calls to `git_merge_base_many`?