merge-tree: add a --allow-unrelated-histories flag