Implement git_merge_base_octopus