merge_base function

Find a merge base between two commits