-
Notifications
You must be signed in to change notification settings - Fork 123
Existing diff3 implementations #2873
Comments
The linked repository is under Apache 2.0 License, not GPL. Apache 2.0 would be fine, we already have a few files under Apache 2.0. |
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 :) |
Yes, and it would be more clear if you make a list or table of the different implementations, describing what you found out for each of those. Not only the license matters but also the features and if the data structure is suitable for you. |
List of diff/diff3 programsLibXDiffhttp://www.xmailserver.org/xdiff-lib.html
libgit2 for example uses LibXDiff API is available at http://www.xmailserver.org/xdiff.html and there is especially xdl_merge3 libgit2
API is here, especially the diff function is interesting. Arree Diff Match Patchhttps://github.com/arrbee/diff-match-patch-c
Really easy API MatthieuTranCSUF/myers-diffhttps://github.com/MatthieuTranCSUF/myers-diff No license or description. Some lines of C that seem to implement Myers diff. OpenBSD diff3http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/diff3/diff3prog.c Dual licensed with BSD 3-clause and BSD-clause?? GNU Diffutils diff3https://github.com/Distrotech/diffutils/blob/distrotech-diffutils/src/diff3.c 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. Apple diff3https://opensource.apple.com/source/gnudiff/gnudiff-10/diffutils/diff3.c.auto.html. SVN diff3https://svn.apache.org/repos/asf/subversion/trunk/tools/diff/
Apache License 2.0. Heavily integrated. No easily accessible API. C. Git mergehttps://github.com/git/git No easily accessible API for simply diffing and merging 3 files. git4ideaNo easily accessible API. Java. Google Diff Match Patchhttps://github.com/google/diff-match-patch/blob/master/LICENSE
Many languages but not C99
Apache License 2.0 ConclusionI 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). This means:
|
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
There are more similar resources under different licenses, for example under Apache License or GPL (this is not 3 way yet).
Unfortunately, we can use none of them and still publish Elektra as BSD 3-clause.
The only resource that we could maybe use is from OpenBSD. However, I'm not sure which of the two BSD licenses in this file takes effect, the 3 or 4-clause.
The text was updated successfully, but these errors were encountered: