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

Re: [PATCH 2/2] Move sequencer to builtin

From
Duy Nguyen <pclouds@gmail.com>
Date
Jun 8, 2013, 13:15 UTC
Message-ID
<CACsJy8B=m95mpRn1dAwQZAvHRUeJVjKy1hKXv43EKX08ZODsDw@mail.gmail.com>
In-Reply-To
<CALkWK0mLoeO5fKezE5S1LEC2LNH9qCwxHnNi_ZJpYzC7rVTqmg@mail.gmail.com>
On Sat, Jun 8, 2013 at 7:55 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 19 quoted lines
> Duy Nguyen wrote:
>>> until libgit.a == libgit2. Done.
>>
>> Read up about the introduction of libgit2, why it was created in the
>> first place instead of moving a few files around renaming libgit.a to
>> libgit2.a. Unless you have a different definition of "==" than I do.
>
> As far as I know, there was never an extensive on-list discussion
> about why git.git cannot be lib'ified.  The first appearance of
> libgit2 is here [1].  I briefly read through the initial history of
> libgit2.git too, but I cannot find a single discussion detailing why
> lib'ifying git.git is fundamentally unworkable (there's some vague
> mention of "global state baggage" and "presence of die()", but that's
> about it).  Unless you can point to some detailed discussions, or
> write out a really good reason yourself, I don't think there's any
> harm in letting fc try.  Ofcourse, he still indicated any sort of plan
> yet, and I'm also waiting for that.
>
> [1]: http://thread.gmane.org/gmane.comp.version-control.git/99608

Hm.. I thought Shawn wrote a bit more in that mail. Apparently I was wrong. I think it's discuessed in the list from time to time (otherwise I wouldn't know) but I don't keep bookmarks.

I _think_ the reason is because git was never written as a reusable library in mind from the beginning. So global states and die() exist. Worse, "run once and let the OS clean eveything up at process exit" leads to some deliberate memory leak if it's made a library. See alloc.c for example. The internal API is not really designed to be usuable/stable as a library. All of these made it very hard to convert the current code base into a true library. So the effort was put into creating a new library instead, copying code from git code base over when possible.

So instead of redoing it again, I think it's better that you help libgit2 guys improve it to the extend that git commands can be easily reimplemented. Then bring up the discussion about using libgit2 in C Git again. -- Duy

Previous: Ramkumar RamachandraNext: Felipe Contreras
Message 10 of 82 in “Move sequencer”
  1. 0/2 Move sequencerFelipe Contreras, Jun 7, 2013
  2. 1/2 log-tree: remove dependency from sequencerFelipe Contreras, Jun 7, 2013
  3. 2/2 Move sequencer to builtinFelipe Contreras, Jun 7, 2013
  4. Duy NguyenJun 8, 2013
  5. Felipe ContrerasJun 8, 2013
  6. Duy NguyenJun 8, 2013
  7. Felipe ContrerasJun 8, 2013
  8. Duy NguyenJun 8, 2013
  9. Ramkumar RamachandraJun 8, 2013
  10. Duy NguyenJun 8, 2013
  11. Felipe ContrerasJun 8, 2013
  12. Ramkumar RamachandraJun 8, 2013
  13. Felipe ContrerasJun 8, 2013
  14. Duy NguyenJun 8, 2013
  15. Felipe ContrerasJun 8, 2013
  16. Jeff KingJun 9, 2013
  17. Ramkumar RamachandraJun 9, 2013
  18. Jeff KingJun 9, 2013
  19. Ramkumar RamachandraJun 9, 2013
  20. Felipe ContrerasJun 9, 2013
  21. Jeff KingJun 9, 2013
  22. Felipe ContrerasJun 9, 2013
  23. Ramkumar RamachandraJun 9, 2013
  24. Jeff KingJun 9, 2013
  25. Felipe ContrerasJun 9, 2013
  26. Felipe ContrerasJun 9, 2013
  27. Felipe ContrerasJun 9, 2013
  28. Felipe ContrerasJun 8, 2013
  29. Jonathan NiederJun 8, 2013
  30. Felipe ContrerasJun 8, 2013
  31. Jonathan NiederJun 8, 2013
  32. Felipe ContrerasJun 8, 2013
  33. Felipe ContrerasJun 8, 2013
  34. Jonathan NiederJun 9, 2013
  35. Felipe ContrerasJun 9, 2013
  36. Jonathan NiederJun 9, 2013
  37. Felipe ContrerasJun 9, 2013
  38. Jeff KingJun 9, 2013
  39. Felipe ContrerasJun 9, 2013
  40. Jeff KingJun 9, 2013
  41. Felipe ContrerasJun 9, 2013
  42. Jeff KingJun 9, 2013
  43. Felipe ContrerasJun 9, 2013
  44. Johan HerlandJun 9, 2013
  45. Felipe ContrerasJun 9, 2013
  46. Michael HaggertyJun 9, 2013
  47. Stefano LattariniJun 9, 2013
  48. Felipe ContrerasJun 10, 2013
  49. Bad attitudes and problems in the Git community (was: Re: [PATCH 2/2] Move sequencer to builtin)Stefano Lattarini, Jun 10, 2013
  50. Felipe ContrerasJun 10, 2013
  51. Martin von ZweigbergkJun 10, 2013
  52. Martin LanghoffJun 10, 2013
  53. Martin von ZweigbergkJun 10, 2013
  54. Felipe ContrerasJun 10, 2013
  55. Felipe ContrerasJun 10, 2013
  56. Andres FreundJun 11, 2013
  57. Felipe ContrerasJun 11, 2013
  58. Thiago FarinaJun 20, 2013
  59. Thomas RastJun 9, 2013
  60. Felipe ContrerasJun 9, 2013
  61. Ramkumar RamachandraJun 9, 2013
  62. Felipe ContrerasJun 9, 2013
  63. Jeff KingJun 9, 2013
  64. Ramkumar RamachandraJun 9, 2013
  65. Jeff KingJun 9, 2013
  66. Jonathan NiederJun 9, 2013
  67. Felipe ContrerasJun 9, 2013
  68. Ramkumar RamachandraJun 9, 2013
  69. Junio C HamanoJun 9, 2013
  70. Felipe ContrerasJun 10, 2013
  71. Junio C HamanoJun 10, 2013
  72. Felipe ContrerasJun 10, 2013
  73. Felipe ContrerasJun 10, 2013
  74. Matthieu MoyJun 10, 2013
  75. Ramkumar RamachandraJun 10, 2013
  76. Felipe ContrerasJun 10, 2013
  77. Felipe ContrerasJun 9, 2013
  78. Thomas RastJun 9, 2013
  79. Ramkumar RamachandraJun 9, 2013
  80. Felipe ContrerasJun 9, 2013
  81. Ramkumar RamachandraJun 8, 2013
  82. Felipe ContrerasJun 8, 2013

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.