Re:Myers Diff Algorithm – Code and Interactive Visualization
by zaptheimpaler on Monday July 03, 2017 @02:14PM
(#14690267)
As a newbie to how diff-ing is done in production, does git use vanilla edit-distance diffing too?
[ Parent
| on HN ]
Re:Myers Diff Algorithm – Code and Interactive Visualization
by peff on Monday July 03, 2017 @02:36PM
(#14690424)
Git uses Myers diff, but recently added some heuristics to "shift" the hunks in semantically meaningful ways. See https://github.com/mhagger/diff-slider-tools for the experiments that led to this feature.
It also supports a few other diff algorithms: `--patience` and `--histogram`, but in my experience they produce the same output as Myers in most cases.