How to build a `Git diff` driver

8 hours ago (jvt.me)

The point about textconv being sufficient in many cases is worth emphasizing — the cases where you actually need a full diff driver are when the file has semantics that text diff destroys. OpenAPI specs are a good example: a field rename looks like a deletion + addition in text diff but is a single semantic change.

I ran into the same thing building a semantic diff for a DSL compiler — text diff would report noise on every whitespace or reorder change, but the meaningful question is "which fields changed type, which statements were added or removed." Once you're operating on the AST the signal-to-noise ratio is completely different.