I'm still surprised merge conflicts show up so often. At its core, diff and diff3 haven't changed since the 1980s. Complicated, heuristic-based algorithms that don't take into account the rich metadata and semantics we can understand today.
diff3 is not
- idempotent
- semantic
- stable (formally, stability means that there exists a constant such that for small enough changes there is a guaranteed small merge)
[1] https://matt-rickard.com/diff3-shortcomings/ [2] https://matt-rickard.com/diff-the-magic-behind-version-contr...