Hacker News new | ask | show | jobs
by Buetol 2268 days ago
I also researched the best diff algorithm. Google's diff-match-patch [1] library produce very good diffs for example. But I found that the best diffs are produced by wikidiff2 [2], the MediaWiki diff engine. Both engines produce word-by-word diff.

[1]: https://github.com/google/diff-match-patch

[2]: https://www.mediawiki.org/wiki/Wikidiff2

1 comments

I wonder if these could be used as custom git diff drivers.
Maybe, I've already used another diff engine, WikiWho [1], to do my own implementation of git blame [2] (shameless self-promotion)

[1]: https://github.com/wikiwho/WikiWho

[2]: https://pypi.org/project/git-word-blame/