get_merge_bases: clean up even when there is no common commit.