use merge-base as the common ancestor