From: Phillip Wood Date: Wed, 24 Sep 2025 13:48:26 GMT Subject: Re: gitoxide-compatible licensing of Git's Rust code, was Re: [PATCH 6/7] xdiff: conditionally use Rust's implementation of xxhash Message-ID: In-Reply-To: <20250923174825.GB1136654@coredump.intra.peff.net> On 23/09/2025 18:48, Jeff King wrote: > On Tue, Sep 23, 2025 at 11:57:18AM +0200, Johannes Schindelin wrote: > >> It would not even take more than something as simple as GPLv2+exception. >> We do have prior art for that: The Git project itself suggests in its very >> own `COPYING` file to use the following license in new files: >> >> This file is licensed under the GPL v2, or a later version >> at the discretion of Linus. >> >> Note the exception? For new Rust code (and of course excluding code that >> has been ported verbatim from GPLv2-licensed code), GPL v2 could be used >> with an exception along these lines: This file is licensed under the GPL >> v2, with the exception that it can be freely used in the Gitoxide project. > > I think this "and of course" parenthetical might be a sticking point. > Obviously taking the code verbatim and re-licensing it is not allowed. > But I think even reading the C code and then writing substantially > similar Rust code may be legally questionable. The Rust code under the > more permissive license has to either be clean-room, or have permission > for re-licensing from the original authors (which is getting to be all > but impossible over time as code ends up being touched by many people). > > I think this is the same issue that libgit2 ran into. If it were just a > matter of porting over and re-writing new features, more of it would > have been done. But for code to come under the new license it can't just > be a port, but has to be an independent work. Thanks for putting this so clearly, I agree with everything that you've written here. Another thing I'm concerned/confused about is how the exception for a single project works in practice. Does it mean that a third party that wants to re-use some code from GitOxide has to check if the code originally came from Git to determine which license it is under? Or does it mean that anyone who wants to use Git's code without the copyleft restrictions can do so if they launder it through GitOxide first? Neither of those seems like a great outcome. Thanks Phillip