xref: /freebsd/contrib/libdiff/README (revision 59c8e88e)
1*59c8e88eSDag-Erling SmørgravThis is a collection of diff algorithms, to test various combinations.
2*59c8e88eSDag-Erling Smørgrav
3*59c8e88eSDag-Erling SmørgravThe initial aim was to provide a faster diff implementation for got
4*59c8e88eSDag-Erling Smørgrav(gameoftrees.org) with a BSD license, at the u2k20 OpenBSD hackathon.
5*59c8e88eSDag-Erling SmørgravA side effect could be improving OpenBSD's /usr/bin/diff utility.
6*59c8e88eSDag-Erling Smørgrav
7*59c8e88eSDag-Erling SmørgravAt the time of writing, this is little more than a playground / benchmark basis
8*59c8e88eSDag-Erling Smørgrav/ diff algorithm analysis platform. What could be done:
9*59c8e88eSDag-Erling Smørgrav- add profiling and test series to rate diff algorithm combinations.
10*59c8e88eSDag-Erling Smørgrav- interface with / merge into got.
11*59c8e88eSDag-Erling Smørgrav
12*59c8e88eSDag-Erling SmørgravThe Myers and Patience Diff algorithm implementations found here are based on
13*59c8e88eSDag-Erling Smørgravthe explanations found in these blog post series:
14*59c8e88eSDag-Erling Smørgrav  https://blog.jcoglan.com/2017/02/12/the-myers-diff-algorithm-part-1/ ff.
15*59c8e88eSDag-Erling Smørgravand
16*59c8e88eSDag-Erling Smørgrav  https://blog.jcoglan.com/2017/09/19/the-patience-diff-algorithm/ ff.
17*59c8e88eSDag-Erling Smørgrav-- possibly the single most comprehensive explanations of these algorithms.
18*59c8e88eSDag-Erling SmørgravMany thanks for this valuable door opener!
19*59c8e88eSDag-Erling SmørgravThe source code itself is not based on the code found in those blogs, but
20*59c8e88eSDag-Erling Smørgravwritten from scratch with the knowledge gained.
21*59c8e88eSDag-Erling Smørgrav
22*59c8e88eSDag-Erling SmørgravCompile:
23*59c8e88eSDag-Erling Smørgrav  make -C diff
24*59c8e88eSDag-Erling Smørgrav
25*59c8e88eSDag-Erling SmørgravTest:
26*59c8e88eSDag-Erling Smørgrav  make -C test/
27