Implement git_merge_octopus_bases

#2156