Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Existing diff3 implementations #2873
I spent some time looking for well thought out implementations of diff3 algorithms.
FreeBSD for example has a GPL implementation in its contrib directory. But I guess doing this would interfere with
Unfortunately, we can use none of them and still publish Elektra as BSD 3-clause.
Oops, too many open tabs and copied links.
Apparently the arrows in the wikipedia image don't work as I thought after a first glance. Thank you for taking a look! I'll look for more Apache (and according to the list MIT) stuff tomorrow :)
List of diff/diff3 programs
libgit2 for example uses LibXDiff
API is available at http://www.xmailserver.org/xdiff.html and there is especially xdl_merge3
Arree Diff Match Patch
Really easy API
No license or description. Some lines of C that seem to implement Myers diff.
Dual licensed with BSD 3-clause and BSD-clause??
GNU Diffutils diff3
The well-known diff3. GPLv3. 1700 lines and has to call a regular diff which again has 1400 lines => Much blabla that we don't need.
Apache License 2.0. Heavily integrated. No easily accessible API. C.
No easily accessible API for simply diffing and merging 3 files.
No easily accessible API. Java.
Google Diff Match Patch
Many languages but not C99
Apache License 2.0
I read in some forum posts that we could link LGPL programs into our BSD code, but found no reliable looking source yet. If this is true, then LibXDiff looks like the best solution to me at the moment.
Thank you! Very nice summary! You can also put that into your thesis!
It is no problem to link against an LGPL library if the library is already available in the usual distributions. But it seems like all these libs are not present (at least not on Debian).
So it seems like we need to also deliver the source, and then LGPL is not ok.
As discussed we will use libgit2 as optional dependency with a fallback where arrays will always conflict when they are different (as it is now).