git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 6/7] xdiff: conditionally use Rust's implementation of xxhash

From
YCYee Cheng Chin <ychin.macvim@gmail.com>
Date
Oct 5, 2025, 05:32 UTC
Message-ID
<CAHTeOx84BaAS1tkGdvoj1c6z+We+NobsJsTpfshw-xHn-NXGLw@mail.gmail.com>
In-Reply-To
<dd3a7ab0-947b-4592-a086-8c7028f02ffd@gmail.com>

Hi, I have a different but related question. Xdiff is currently licensed under LGPL, not GPL. With the new Rust code not having any license header in their files, what is the intention for the licensing for them? Given that these are derived from the original Xdiff code, I would have imagined they would use the existing LGPL license for Xdiff, but the lack of licensing header makes it seem like they are just going to inherit the GPL license from Git. Is this a conscious relicensing effort? Or just something that hasn't come up yet? Otherwise if xdiff stops being a standalone codebase (due to it relying on the Rust components), it would essentially mean it ceases to be a library that could be used by other parties.

This is critical for downstream projects that use Xdiff. For example, libgit2 mtaintains an xdiff fork, and Vim (which I contribute to) / Neovim currently use Xdiff as the internal diff engine, which per my understanding is only possible due to the license being LGPL (Vim is licensed under the Vim license and Neovim is under Vim / Apache).

On Sun, Jul 20, 2025 at 3:15 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 59 quoted lines
>
> Hi Johannes
>
> On 19/07/2025 22:53, Johannes Schindelin wrote:
> > Hi Ezekiel,
> >
> > On Thu, 17 Jul 2025, Ezekiel Newren via GitGitGadget wrote:
> >
> >> diff --git a/rust/xdiff/src/lib.rs b/rust/xdiff/src/lib.rs
> >> index e69de29bb2d1..96975975a1ba 100644
> >> --- a/rust/xdiff/src/lib.rs
> >> +++ b/rust/xdiff/src/lib.rs
> >> @@ -0,0 +1,7 @@
> >> +
> >> +
> >> +#[no_mangle]
> >> +unsafe extern "C" fn xxh3_64(ptr: *const u8, size: usize) -> u64 {
> >> +    let slice = std::slice::from_raw_parts(ptr, size);
> >> +    xxhash_rust::xxh3::xxh3_64(slice)
> >> +}
> >
> > I know that this is a pretty small file, but I do notice that it does not
> > have a license header.
> >
> > This reminds me of the unfortunate oversight to be careful about making
> > (and keeping) libgit.a's source files compatible with libgit2's license to
> > nurture a fruitful exchange between those two projects.
>
> I'm not sure I follow your reasoning here. libgit2 was started after git
> and chose to use an incompatible license. I wasn't around at the time
> but isn't there a list of git contributors who are happy to re-license
> their contributions with the linking exception used by libgit2?
>
> > With Rust, we still have a really good chance to learn from history and
> > avoid that mistake: Gitoxide is a very exciting project with clear overlap
> > in its mission to implement Git functionality in Rust. Gitoxide is
> > dual-licensed under the Apache License v2 and the MIT license (see
> > https://github.com/GitoxideLabs/gitoxide?tab=readme-ov-file#license).
> >
> > Would you mind adding a license header to that file that explicitly allows
> > the contents of the file to be used in Gitoxide, to get the Rust effort
> > started on a good foot?
>
> I wary of that for two reasons. Firstly over time it is de-facto
> re-licensing git as the amount of rust code grows and the amount of C
> code shrinks which deserves a wider discussion. Secondly it makes it
> harder to convert our C code which is licensed under GPL2 (or in the
> case of xdiff LGPL) to rust if the rust code uses a different license.
>
> If someone wants to start a discussion about re-licensing git (and is
> prepared to do all of the associated admin in the event that it happens)
> then by all means do so but I don't think it we want to slip such a
> change into this series.
>
> Thanks
>
> Phillip
>
>
Previous: Phillip WoodNext: Patrick Steinhardt
Message 202 of 204 in “RFC: Accelerate xdiff and begin its rustification”
  1. 0/7 RFC: Accelerate xdiff and begin its rustificationEzekiel Newren via GitGitGadget, Jul 17, 2025
  2. 1/7 xdiff: introduce rustEzekiel Newren via GitGitGadget, Jul 17, 2025
  3. 2/7 xdiff/xprepare: remove superfluous forward declarationsEzekiel Newren via GitGitGadget, Jul 17, 2025
  4. 3/7 xdiff: delete unnecessary fields from xrecord_t and xdfile_tEzekiel Newren via GitGitGadget, Jul 17, 2025
  5. 4/7 xdiff: make fields of xrecord_t Rust friendlyEzekiel Newren via GitGitGadget, Jul 17, 2025
  6. 5/7 xdiff: separate parsing lines from hashing themEzekiel Newren via GitGitGadget, Jul 17, 2025
  7. 6/7 xdiff: conditionally use Rust's implementation of xxhashEzekiel Newren via GitGitGadget, Jul 17, 2025
  8. 7/7 github_workflows: install rustEzekiel Newren via GitGitGadget, Jul 17, 2025
  9. brian m. carlsonJul 17, 2025
  10. brian m. carlsonJul 17, 2025
  11. brian m. carlsonJul 17, 2025
  12. Junio C HamanoJul 17, 2025
  13. Taylor BlauJul 17, 2025
  14. Taylor BlauJul 17, 2025
  15. Taylor BlauJul 17, 2025
  16. Taylor BlauJul 17, 2025
  17. Taylor BlauJul 17, 2025
  18. Taylor BlauJul 17, 2025
  19. brian m. carlsonJul 17, 2025
  20. Taylor BlauJul 17, 2025
  21. Elijah NewrenJul 17, 2025
  22. Taylor BlauJul 18, 2025
  23. Taylor BlauJul 18, 2025
  24. brian m. carlsonJul 18, 2025
  25. Christian BrabandtJul 18, 2025
  26. Phillip WoodJul 18, 2025
  27. Phillip WoodJul 18, 2025
  28. Phillip WoodJul 18, 2025
  29. Junio C HamanoJul 18, 2025
  30. Junio C HamanoJul 18, 2025
  31. Junio C HamanoJul 18, 2025
  32. Eli SchwartzJul 18, 2025
  33. Ezekiel NewrenJul 18, 2025
  34. Ezekiel NewrenJul 18, 2025
  35. Ezekiel NewrenJul 18, 2025
  36. Elijah NewrenJul 19, 2025
  37. Haelwenn (lanodan) MonnierJul 19, 2025
  38. Johannes SchindelinJul 19, 2025
  39. Johannes SchindelinJul 19, 2025
  40. Johannes SchindelinJul 19, 2025
  41. Johannes SchindelinJul 20, 2025
  42. Matthias AßhauerJul 20, 2025
  43. Phillip WoodJul 20, 2025
  44. Phillip WoodJul 21, 2025
  45. Junio C HamanoJul 21, 2025
  46. Patrick SteinhardtJul 22, 2025
  47. Patrick SteinhardtJul 22, 2025
  48. Patrick SteinhardtJul 22, 2025
  49. Eli SchwartzJul 22, 2025
  50. Junio C HamanoJul 22, 2025
  51. Sam JamesJul 22, 2025
  52. Sam JamesJul 22, 2025
  53. Elijah NewrenJul 22, 2025
  54. Sam JamesJul 22, 2025
  55. Collin FunkJul 22, 2025
  56. Mike HommeyJul 22, 2025
  57. brian m. carlsonJul 22, 2025
  58. Patrick SteinhardtJul 23, 2025
  59. brian m. carlsonJul 23, 2025
  60. Junio C HamanoJul 23, 2025
  61. Pierre-Emmanuel PatryJul 24, 2025
  62. Patrick SteinhardtJul 24, 2025
  63. Ben KnobleJul 25, 2025
  64. Pierre-Emmanuel PatryJul 28, 2025
  65. Ezekiel NewrenJul 28, 2025
  66. Ezekiel NewrenJul 28, 2025
  67. Phillip WoodJul 28, 2025
  68. Collin FunkJul 28, 2025
  69. Ezekiel NewrenJul 28, 2025
  70. Junio C HamanoJul 28, 2025
  71. Phillip WoodJul 31, 2025
  72. Ezekiel NewrenJul 31, 2025
  73. Ezekiel NewrenJul 31, 2025
  74. brian m. carlsonJul 31, 2025
  75. Phillip WoodAug 1, 2025
  76. Matthias AßhauerAug 2, 2025
  77. 00/17 RFC: Accelerate xdiff and begin its rustificationEzekiel Newren via GitGitGadget, Aug 15, 2025
  78. 01/17 doc: add a policy for using Rustbrian m. carlson via GitGitGadget, Aug 15, 2025
  79. 02/17 xdiff: introduce rustEzekiel Newren via GitGitGadget, Aug 15, 2025
  80. 03/17 xdiff/xprepare: remove superfluous forward declarationsEzekiel Newren via GitGitGadget, Aug 15, 2025
  81. 04/17 xdiff: delete unnecessary fields from xrecord_t and xdfile_tEzekiel Newren via GitGitGadget, Aug 15, 2025
  82. 05/17 xdiff: make fields of xrecord_t Rust friendlyEzekiel Newren via GitGitGadget, Aug 15, 2025
  83. 06/17 xdiff: separate parsing lines from hashing themEzekiel Newren via GitGitGadget, Aug 15, 2025
  84. 07/17 xdiff: conditionally use Rust's implementation of xxhashEzekiel Newren via GitGitGadget, Aug 15, 2025
  85. 08/17 github workflows: install rustEzekiel Newren via GitGitGadget, Aug 15, 2025
  86. 09/17 Do support Windows again after requiring RustJohannes Schindelin via GitGitGadget, Aug 15, 2025
  87. 10/17 win+Meson: allow for xdiff to be compiled with MSVCJohannes Schindelin via GitGitGadget, Aug 15, 2025
  88. 11/17 win+Meson: do allow linking with the Rust-built xdiffJohannes Schindelin via GitGitGadget, Aug 15, 2025
  89. 12/17 github workflows: define rust versions and targets in the same placeEzekiel Newren via GitGitGadget, Aug 15, 2025
  90. 13/17 github workflows: upload Cargo.lockEzekiel Newren via GitGitGadget, Aug 15, 2025
  91. 14/17 xdiff: implement a white space iterator in RustEzekiel Newren via GitGitGadget, Aug 15, 2025
  92. 15/17 xdiff: create line_hash() and line_equal()Ezekiel Newren via GitGitGadget, Aug 15, 2025
  93. 16/17 xdiff: optimize case where --ignore-cr-at-eol is the only whitespace flagEzekiel Newren via GitGitGadget, Aug 15, 2025
  94. 17/17 xdiff: use rust's version of whitespace processingEzekiel Newren via GitGitGadget, Aug 15, 2025
  95. Ramsay JonesAug 15, 2025
  96. Matthias AßhauerAug 15, 2025
  97. Matthias AßhauerAug 15, 2025
  98. Junio C HamanoAug 15, 2025
  99. Junio C HamanoAug 15, 2025
  100. Johannes SchindelinAug 15, 2025
  101. Junio C HamanoAug 15, 2025
  102. Junio C HamanoAug 15, 2025
  103. Matthias AßhauerAug 16, 2025
  104. Matthias AßhauerAug 16, 2025
  105. Junio C HamanoAug 17, 2025
  106. Junio C HamanoAug 18, 2025
  107. Ben KnobleAug 18, 2025
  108. Elijah NewrenAug 19, 2025
  109. Elijah NewrenAug 19, 2025
  110. Ezekiel NewrenAug 19, 2025
  111. Ezekiel NewrenAug 19, 2025
  112. Junio C HamanoAug 19, 2025
  113. 00/15 RFC: Cleanup xdiff and begin its rustificationEzekiel Newren via GitGitGadget, Aug 23, 2025
  114. 01/15 doc: add a policy for using Rustbrian m. carlson via GitGitGadget, Aug 23, 2025
  115. 02/15 xdiff: introduce rustEzekiel Newren via GitGitGadget, Aug 23, 2025
  116. 03/15 github workflows: install rustEzekiel Newren via GitGitGadget, Aug 23, 2025
  117. 04/15 win+Meson: do allow linking with the Rust-built xdiffJohannes Schindelin via GitGitGadget, Aug 23, 2025
  118. 05/15 github workflows: upload Cargo.lockEzekiel Newren via GitGitGadget, Aug 23, 2025
  119. 06/15 ivec: create a vector type that is interoperable between C and RustEzekiel Newren via GitGitGadget, Aug 23, 2025
  120. 07/15 xdiff/xprepare: remove superfluous forward declarationsEzekiel Newren via GitGitGadget, Aug 23, 2025
  121. 08/15 xdiff: delete unnecessary fields from xrecord_t and xdfile_tEzekiel Newren via GitGitGadget, Aug 23, 2025
  122. 09/15 xdiff: make fields of xrecord_t Rust friendlyEzekiel Newren via GitGitGadget, Aug 23, 2025
  123. 10/15 xdiff: use one definition for freeing xdfile_tEzekiel Newren via GitGitGadget, Aug 23, 2025
  124. 11/15 xdiff: replace chastore with an ivec in xdfile_tEzekiel Newren via GitGitGadget, Aug 23, 2025
  125. 12/15 xdiff: delete nrec field from xdfile_tEzekiel Newren via GitGitGadget, Aug 23, 2025
  126. 14/15 xdiff: make xdfile_t more rust friendlyEzekiel Newren via GitGitGadget, Aug 23, 2025
  127. 13/15 xdiff: delete recs field from xdfile_tEzekiel Newren via GitGitGadget, Aug 23, 2025
  128. 15/15 xdiff: implement xdl_trim_ends() in RustEzekiel Newren via GitGitGadget, Aug 23, 2025
  129. Kristoffer HaugsbakkAug 23, 2025
  130. Ezekiel NewrenAug 23, 2025
  131. rsbecker@nexbridge.comAug 23, 2025
  132. Kristoffer HaugsbakkAug 23, 2025
  133. Ezekiel NewrenAug 23, 2025
  134. rsbecker@nexbridge.comAug 23, 2025
  135. Junio C HamanoAug 23, 2025
  136. Ezekiel NewrenAug 23, 2025
  137. Junio C HamanoAug 23, 2025
  138. Elijah NewrenAug 23, 2025
  139. brian m. carlsonAug 23, 2025
  140. rsbecker@nexbridge.comAug 23, 2025
  141. Ezekiel NewrenAug 23, 2025
  142. Sam JamesAug 23, 2025
  143. Haelwenn (lanodan) MonnierAug 23, 2025
  144. Ben KnobleAug 24, 2025
  145. Patrick SteinhardtAug 24, 2025
  146. Elijah NewrenAug 25, 2025
  147. Ezekiel NewrenAug 25, 2025
  148. Junio C HamanoAug 26, 2025
  149. D. Ben KnobleAug 26, 2025
  150. Ezekiel NewrenAug 26, 2025
  151. brian m. carlsonAug 26, 2025
  152. Taylor BlauAug 27, 2025
  153. rsbecker@nexbridge.comAug 27, 2025
  154. Junio C HamanoAug 27, 2025
  155. rsbecker@nexbridge.comAug 27, 2025
  156. Taylor BlauAug 27, 2025
  157. Junio C HamanoAug 27, 2025
  158. Patrick SteinhardtSep 2, 2025
  159. Sam JamesSep 2, 2025
  160. brian m. carlsonSep 2, 2025
  161. Sam JamesSep 2, 2025
  162. Patrick SteinhardtSep 3, 2025
  163. Ramsay JonesSep 3, 2025
  164. Collin FunkSep 3, 2025
  165. Junio C HamanoSep 3, 2025
  166. Josh SteadmonSep 3, 2025
  167. brian m. carlsonSep 4, 2025
  168. Patrick SteinhardtSep 4, 2025
  169. Patrick SteinhardtSep 4, 2025
  170. Sam JamesSep 4, 2025
  171. Junio C HamanoSep 4, 2025
  172. Ezekiel NewrenSep 4, 2025
  173. Elijah NewrenSep 5, 2025
  174. Elijah NewrenSep 5, 2025
  175. Patrick SteinhardtSep 5, 2025
  176. Patrick SteinhardtSep 5, 2025
  177. Phillip WoodSep 5, 2025
  178. Sam JamesSep 5, 2025
  179. Phillip WoodSep 5, 2025
  180. Patrick SteinhardtSep 5, 2025
  181. Junio C HamanoSep 5, 2025
  182. Elijah NewrenSep 7, 2025
  183. rsbecker@nexbridge.comSep 7, 2025
  184. Patrick SteinhardtSep 8, 2025
  185. Patrick SteinhardtSep 8, 2025
  186. Phillip WoodSep 8, 2025
  187. Ezekiel NewrenSep 8, 2025
  188. Elijah NewrenSep 8, 2025
  189. rsbecker@nexbridge.comSep 8, 2025
  190. rsbecker@nexbridge.comSep 8, 2025
  191. rsbecker@nexbridge.comSep 8, 2025
  192. Elijah NewrenSep 8, 2025
  193. rsbecker@nexbridge.comSep 8, 2025
  194. gitoxide-compatible licensing of Git's Rust code, was Re: [PATCH 6/7] xdiff: conditionally use Rust's implementation of xxhashJohannes Schindelin, Sep 23, 2025
  195. Jeff KingSep 23, 2025
  196. Phillip WoodSep 24, 2025
  197. Jeff KingSep 25, 2025
  198. Patrick SteinhardtSep 25, 2025
  199. Phillip WoodSep 26, 2025
  200. Jeff KingOct 3, 2025
  201. Phillip WoodOct 3, 2025
  202. Yee Cheng ChinOct 5, 2025
  203. Patrick SteinhardtOct 7, 2025
  204. Johannes SchindelinNov 17, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.