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

Re: [Administrivia] On ruby and contrib/

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jun 9, 2013, 02:41 UTC
Message-ID
<CAMP44s2bNQ2GCXGcZBQBcTa3BPXCt6vTUsG36b_4L1WzfN=aEQ@mail.gmail.com>
In-Reply-To
<20130609022351.GA30393@sigill.intra.peff.net>
On Sat, Jun 8, 2013 at 9:23 PM, Jeff King <peff@peff.net> wrote:
Show 9 quoted lines
> On Sat, Jun 08, 2013 at 08:17:08PM -0500, Felipe Contreras wrote:
>
>> > No, I didn't say that at all.
>>
>> Then you truly think libgit2 will ever reach the point where it can
>> replace libgit.a?
>
> I don't know. It may. Or something like it may. It is certainly not
> ready to do so yet, but perhaps one day it will be.

Perhaps one day we would end poverty and hunger, and perhaps one day we will live in peace, but I wouldn't hold on my breath. I fact, I'll do the opposite, I bet it won't happen anytime soon.

Show 10 quoted lines
>> It won't.
>
> Oh, I see, you were not actually interested in my answer and were just
> being rhetorical.
>
>> But decreeing that both projects should remain isolated, and
>> that libgit.a should never be a library, you are effectively
>> condemning the effort to fail, knowingly or not.
>
> Huh? When did I decree anything?

When you said in your opinion we should wait until libgit2 is ready, and not improve libgit.a.

Show 7 quoted lines
>> How many years has libgit2 been brewing? Do you think it's closer for
>> merging so it can be used by Git's core? No, it doesn't, and it will
>> not in the future, because it was never meant for that.
>
> There has been about 2 years of active development, and there's been
> quite a lot of improvement in that time. Closer than what? Than it was 2
> years ago? Yes, I think it is. But it still has a ways to go.

Why is it closer? In what ways is it a better fit now than 2 years ago? What is missing before merging to be used in Git's core?

> I do not think there will be a flag day where we throw away git.git's
> code and start using libgit2. But we could slowly start replacing
> underlying bits with libgit2 bits, if that implementation proves to be
> robust and clean enough to do so.

And what are we waiting for then? Shouldn't we copy the whole libgit2 code and start migrating?

Show 10 quoted lines
>> > But hey, you don't need to listen to me. If you think it would be easier
>> > to make the git.git code into a library, go ahead and work on it. But I
>> > think you will find that there are a large number of hard-to-find bugs
>> > caused by implicit assumptions about global state, how file descriptors
>> > are used, and so forth.
>>
>> That's impossible. Specially since moving irrelevant code out of
>> libgit.a is not permitted.
>
> I'm not even sure what your second sentence means.

It means this: http://article.gmane.org/gmane.comp.version-control.git/226752

I move code that doesn't belong in a libgit library out of libgit.a, and the change gets rejected.

> But it seems to me that the first step would be cleaning up the internal
> code so that it is more friendly to library callers (both in interface
> and in being re-entrant),

That is the second step. It doesn't make sense to make code re-entrant, if that code will only be used by builtin commands. First step is to move irrelevant code out of libgit.a.

Show 9 quoted lines
>> >> There's a reason why the Git project doesn't use libgit2, and for the
>> >> same reason the official Ruby scripts should not use it.
>> >
>> > What reason is that?
>>
>> You tell me. Why isn't Git using libgit2?
>
> Wait, you indicated you had such a reason in mind, but now you won't
> tell me? Is it a secret?

I did not. I made the assumption that there was a reason, if there's no reason to stay clear of libgit2, then let's merge it already.

Show 11 quoted lines
>> > I think it is a matter of critical mass. If you were to start linking
>> > against libgit.a and 90% of it worked, you might have a reason to fix
>> > the other 10%. But I suspect it is more the other way around.
>>
>> It doesn't matter if it's 90% or 10%, it's the only thing we have.
>>
>> Unless you are in favor of including libgit2 and start using it for
>> Git's core *right now*, the only way forward is to improve libgit.a.
>
> That seems like a false choice to me. You obviously feel that libgit2 is
> some kind of dead end. I don't agree. Whatever.

I never said so. It is a dead end *if* we don't do an effort to have a proper libgit library, which is the path we are taking.

Show 9 quoted lines
> I have very little interest in discussing this further with you, as it
> is not leading in a productive direction. In my opinion, the productive
> things to do would be one (or both) of:
>
>   1. Work on libgit2.
>
>   2. Clean up non-reentrant bits of git.git, hopefully making the code
>      more readable and more modular (and taking care not to make it
>      worse in other ways, like maintainability or performance).
You forgot the first step of 2.: move irrelevant code out of libgit.a.
-- 
Felipe Contreras
Previous: Jeff KingNext: Johannes Schindelin
Message 76 of 104 in “What's cooking in git.git (Jun 2013, #02; Tue, 4)”
  1. Junio C HamanoJun 4, 2013
  2. [Administrivia] On ruby and contrib/Junio C Hamano, Jun 5, 2013
  3. David LangJun 5, 2013
  4. Felipe ContrerasJun 5, 2013
  5. Michael HaggertyJun 5, 2013
  6. Junio C HamanoJun 5, 2013
  7. Matthieu MoyJun 6, 2013
  8. Junio C HamanoJun 7, 2013
  9. Thomas Ferris NicolaisenJun 6, 2013
  10. Felipe ContrerasJun 5, 2013
  11. demerphqJun 6, 2013
  12. Felipe ContrerasJun 6, 2013
  13. Barry FishmanJun 6, 2013
  14. Felipe ContrerasJun 6, 2013
  15. Barry FishmanJun 6, 2013
  16. Felipe ContrerasJun 6, 2013
  17. Barry FishmanJun 6, 2013
  18. Felipe ContrerasJun 6, 2013
  19. Charles McGarveyJun 6, 2013
  20. Greg TroxelJun 6, 2013
  21. Felipe ContrerasJun 6, 2013
  22. David LangJun 6, 2013
  23. Felipe ContrerasJun 6, 2013
  24. Ramkumar RamachandraJun 6, 2013
  25. David LangJun 6, 2013
  26. Ramkumar RamachandraJun 7, 2013
  27. Junio C HamanoJun 7, 2013
  28. Ramkumar RamachandraJun 7, 2013
  29. Felipe ContrerasJun 7, 2013
  30. Ramkumar RamachandraJun 7, 2013
  31. Ramkumar RamachandraJun 7, 2013
  32. Johannes SchindelinJun 9, 2013
  33. Ramkumar RamachandraJun 9, 2013
  34. Junio C HamanoJun 9, 2013
  35. Felipe ContrerasJun 10, 2013
  36. Junio C HamanoJun 7, 2013
  37. Felipe ContrerasJun 7, 2013
  38. Duy NguyenJun 8, 2013
  39. Felipe ContrerasJun 8, 2013
  40. Duy NguyenJun 8, 2013
  41. Felipe ContrerasJun 8, 2013
  42. Felipe ContrerasJun 7, 2013
  43. Greg TroxelJun 6, 2013
  44. Felipe ContrerasJun 6, 2013
  45. Ramkumar RamachandraJun 6, 2013
  46. Dependencies and packaging (Re: [Administrivia] On ruby and contrib/)Jonathan Nieder, Jun 6, 2013
  47. Felipe ContrerasJun 7, 2013
  48. Johannes SchindelinJun 6, 2013
  49. Ramkumar RamachandraJun 6, 2013
  50. Johannes SchindelinJun 7, 2013
  51. Ramkumar RamachandraJun 7, 2013
  52. Matthieu MoyJun 7, 2013
  53. Ramkumar RamachandraJun 7, 2013
  54. Ramkumar RamachandraJun 7, 2013
  55. Matthieu MoyJun 7, 2013
  56. Ramkumar RamachandraJun 7, 2013
  57. Matthieu MoyJun 7, 2013
  58. Felipe ContrerasJun 7, 2013
  59. Jonathan NiederJun 7, 2013
  60. Matthew RuffaloJun 7, 2013
  61. Junio C HamanoJun 7, 2013
  62. Felipe ContrerasJun 7, 2013
  63. Ramkumar RamachandraJun 7, 2013
  64. Johannes SchindelinJun 9, 2013
  65. Duy NguyenJun 8, 2013
  66. Felipe ContrerasJun 8, 2013
  67. Duy NguyenJun 8, 2013
  68. Felipe ContrerasJun 8, 2013
  69. Duy NguyenJun 8, 2013
  70. Felipe ContrerasJun 8, 2013
  71. Jeff KingJun 8, 2013
  72. Felipe ContrerasJun 8, 2013
  73. Jeff KingJun 9, 2013
  74. Felipe ContrerasJun 9, 2013
  75. Jeff KingJun 9, 2013
  76. Felipe ContrerasJun 9, 2013
  77. Johannes SchindelinJun 9, 2013
  78. Johannes SixtJun 5, 2013
  79. Jeff KingJun 5, 2013
  80. t0005: skip signal death exit code test on WindowsJohannes Sixt, Jun 6, 2013
  81. Jeff KingJun 6, 2013
  82. Felipe ContrerasJun 6, 2013
  83. Jeff KingJun 6, 2013
  84. Felipe ContrerasJun 6, 2013
  85. Junio C HamanoJun 6, 2013
  86. Jeff KingJun 6, 2013
  87. Johannes SixtJun 7, 2013
  88. Erik Faye-LundJun 7, 2013
  89. Johannes SixtJun 7, 2013
  90. Erik Faye-LundJun 7, 2013
  91. Johannes SixtJun 7, 2013
  92. Erik Faye-LundJun 7, 2013
  93. Johannes SixtJun 7, 2013
  94. Erik Faye-LundJun 7, 2013
  95. mingw: make mingw_signal return the correct handlerJohannes Sixt, Jun 10, 2013
  96. Erik Faye-LundJun 10, 2013
  97. Junio C HamanoJun 10, 2013
  98. Jeff KingJun 9, 2013
  99. Junio C HamanoJun 9, 2013
  100. Johannes SixtJun 10, 2013
  101. Erik Faye-LundJun 10, 2013
  102. Felipe ContrerasJun 6, 2013
  103. Erik Faye-LundJun 7, 2013
  104. Erik Faye-LundJun 7, 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.