As a historical note, the now-archaic PRCS system also knows about common ancestors and can merge efficiently, though it wasn't distributed (it was built on top of RCS files!). It meant that it could be effectively migrated to git while retain history, however.