Implement ours-then-theirs and theirs-then-ours.