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

Re: [RFC/PATCH 0/7] Rework git core for native submodules

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 7, 2013, 09:00 UTC
Message-ID
<7vr4im7m1y.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0n64BW8zQXweR38T6DjT+iYBbsZDPCLZ-4igqGJHoFwKw@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 9 quoted lines
> Junio C Hamano wrote:
>> I think it is too premature to discuss _your_ code.  The patches do
>> not even tell us anything about how much more work is needed to
>> merely make Git with your patches work properly again.  For one
>> thing, I suspect that you won't even be able to repack a repository
>> that has OBJ_LINK only with the patches you posted.
>
> ...
> You're asking me to submit a perfect 40 or 50 part series...
Not at all.  And please do not start _coding_.

When the design is not clear enough that a 7-patch series is not ready to be reviewed, certainly 50-patch series will not be. Not until you can explain what you are trying to solve and convince others why other less disruptive approaches are fundamentally unworkable, and why we need to change the object layer.

Show 7 quoted lines
> To reiterate: link does not make possible something that is not
> fundamentally _possible_ with a .githack and a 100k-line Perl script.
>
> At its core, every variant of submodules does this.  What I'm
> essentially proposing: break up the information in .githack into
> smaller bits and create a new object type so it can be parsed by
> git-core easily.

The .gitmodules file is designed to be easily parsable by the config infrastructure and implemented as such already, thank-you-very-much.

Why do you keep calling an already working solution with derogatory misspelling? That only gives others an impression that you do not understand how the current system works, and pursuade them not to waste time responding to you. Stop it.

> When the series matures, we can investigate the other implementations
> in greater detail so we can pick out more optional fields to add to
> the link object before getting it merged.

Sorry, but that is not how open source works in general, and certainly not how this project works.

We do not add disruptive change just for the sake of changing it to break a working system, make an extra work to clean up the fallout for ourselves (i.e. your "40 to 50 patch series", but honestly speaking I expect it would be more like a 4 months work for a full time engineer or two), for unproven design (that has not yet to be illustrated) to solve problems (that has not yet to be explained), without knowing that

 (1) the problems are worth solving;
 (2) the design will solve the problems; and
 (3) solving the same problems without such a disruptive change is
     impossible, or so cumbersome that it will be far larger than
     the work needed to clean-up the fallout of the disruptive
     change.
So what are your X, Y, Z?  You still haven't answered that question.

For that matter, you didn't answer the same question that was more tersely phrased by Linus in the very first response in the thread:

Show 9 quoted lines
> Linus Torvalds wrote:
>> I don't dispute that a new link object might be a good idea, but
>> there's no explanation of the actual format of this thing anywhere,
>> and what the real advantages would be. A clearer "this is the design,
>> this is the format of the link object, and this is what it buys us"
>> would be a good idea.
>
> Yeah, I need help with that.  I've just stuffed in whatever fields
> popped into my mind first.  The current ones are:

And what you listed were your back-then-current thinking on "actual format".

What are the real advantages? How are they used? What do they allow us to do what we cannot do with .gitmodules (or repo or gitslave for that matter)? What do they buy us?

What problem are you trying to solve?

I have this suspicion that you do not have to change anything in the object layer to make Git behave very differently from the current submodule implementation. For example, if your gripe were (I am just speculating without any input from you in this thread) that each submodule working tree has ".git" at their top and there is no unified view from the top-level [*1*], we certainly can solve it without any change to the object layer.

We currently add a cache entry that has the commit object name to the index from the tree object when we check out the superproject, and create a separate repository with a working tree when we instantiate a submodule.

This arrangement does not have to be fundamental. It is a design choice of one particular working tree layout, which is totally local to individual superproject working tree.

You could arrange a single index (the one in the superproject) to hold the tree contents from the commit in the submodule, while noting the original commit object name in a new mandatory extension section in the index. The index will have a unified view of the whole tree, and we do not have to have a .git at the root of each submodule working tree (be it a directory or a gitfile).

I think the message where I talked about the "bind" idea in the list archive URLs I gave you earlier would give you such a layout, and you should go read it again to understand how the flow from object database to index to working tree back to index back to object database was envisioned to work. I think the only thing we need to do differently from that "bind" proposal in the current world order is not to record the new submodule state in the commit object of the superproject, but actually create a new commit for the submodule part and store it in the tree object for the commit in the superproject (the "bind lines in the superproject commit" was a hack, only because we didn't have a way to write the submodule commit object name in the index and in the trees).

[Footnote]

*1* I am not saying that keeping everything down to the leaves of submodules is necessarily a good idea. This is only meant as an illustration of what kind of a system that looks drastically different from the end-user's point of view you could build, without breaking the object layer and having to redo everything.

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 76 of 138 in “Rework git core for native submodules”
  1. 0/7 Rework git core for native submodulesRamkumar Ramachandra, Apr 4, 2013
  2. 1/7 link.c, link.h: introduce fifth object typeRamkumar Ramachandra, Apr 4, 2013
  3. 2/7 sha1_file, link: write link objects to the databaseRamkumar Ramachandra, Apr 4, 2013
  4. Ramkumar RamachandraApr 5, 2013
  5. Ramkumar RamachandraApr 5, 2013
  6. 3/7 teach ce_compare_gitlink() about OBJ_LINKRamkumar Ramachandra, Apr 4, 2013
  7. 4/7 builtin/log: teach show about OBJ_LINKRamkumar Ramachandra, Apr 4, 2013
  8. 5/7 edit-link: add new builtinRamkumar Ramachandra, Apr 4, 2013
  9. 6/7 clone: introduce clone.submodulegitdirRamkumar Ramachandra, Apr 4, 2013
  10. Ramkumar RamachandraApr 5, 2013
  11. 7/7 sha1_file: write ref_name to link objectRamkumar Ramachandra, Apr 4, 2013
  12. Ramkumar RamachandraApr 5, 2013
  13. Linus TorvaldsApr 4, 2013
  14. Ramkumar RamachandraApr 4, 2013
  15. Linus TorvaldsApr 4, 2013
  16. Junio C HamanoApr 4, 2013
  17. Ramkumar RamachandraApr 4, 2013
  18. Jens LehmannApr 4, 2013
  19. Ramkumar RamachandraApr 4, 2013
  20. Linus TorvaldsApr 4, 2013
  21. Ramkumar RamachandraApr 4, 2013
  22. Ramkumar RamachandraApr 4, 2013
  23. Ramkumar RamachandraApr 4, 2013
  24. Ramkumar RamachandraApr 4, 2013
  25. Jens LehmannApr 4, 2013
  26. Ramkumar RamachandraApr 4, 2013
  27. Junio C HamanoApr 4, 2013
  28. Ramkumar RamachandraApr 4, 2013
  29. Junio C HamanoApr 4, 2013
  30. Ramkumar RamachandraApr 4, 2013
  31. Junio C HamanoApr 4, 2013
  32. Ramkumar RamachandraApr 4, 2013
  33. Junio C HamanoApr 5, 2013
  34. Ramkumar RamachandraApr 5, 2013
  35. Ramkumar RamachandraApr 5, 2013
  36. Jonathan NiederApr 4, 2013
  37. Jonathan NiederApr 4, 2013
  38. Jonathan NiederApr 4, 2013
  39. Duy NguyenApr 8, 2013
  40. t3700 (add): add failing test for add with submodulesRamkumar Ramachandra, Apr 8, 2013
  41. Duy NguyenApr 8, 2013
  42. Junio C HamanoApr 8, 2013
  43. Jeff KingApr 8, 2013
  44. Junio C HamanoApr 8, 2013
  45. Jeff KingApr 8, 2013
  46. Ramkumar RamachandraApr 9, 2013
  47. 0/2 Fix git add with submodulesRamkumar Ramachandra, Apr 9, 2013
  48. 1/2 t3700 (add): add two tests for testing add with submodulesRamkumar Ramachandra, Apr 9, 2013
  49. 2/2 add: refuse to add paths beyond repository boundariesRamkumar Ramachandra, Apr 9, 2013
  50. Jeff KingApr 9, 2013
  51. Junio C HamanoApr 9, 2013
  52. Junio C HamanoApr 9, 2013
  53. Ramkumar RamachandraApr 9, 2013
  54. Junio C HamanoApr 9, 2013
  55. Ramkumar RamachandraApr 9, 2013
  56. Junio C HamanoApr 9, 2013
  57. Junio C HamanoApr 9, 2013
  58. Junio C HamanoApr 9, 2013
  59. Ramkumar RamachandraApr 10, 2013
  60. Junio C HamanoApr 10, 2013
  61. Junio C HamanoApr 9, 2013
  62. Ramkumar RamachandraApr 9, 2013
  63. Junio C HamanoApr 9, 2013
  64. Ramkumar RamachandraApr 10, 2013
  65. Jakub NarębskiApr 9, 2013
  66. Junio C HamanoApr 9, 2013
  67. Jakub NarębskiApr 9, 2013
  68. Junio C HamanoApr 9, 2013
  69. Jeff KingApr 9, 2013
  70. Jakub NarębskiApr 9, 2013
  71. Ramkumar RamachandraApr 9, 2013
  72. Jakub NarębskiApr 9, 2013
  73. Ramkumar RamachandraApr 6, 2013
  74. Junio C HamanoApr 7, 2013
  75. Ramkumar RamachandraApr 7, 2013
  76. Junio C HamanoApr 7, 2013
  77. Ramkumar RamachandraApr 7, 2013
  78. Ramkumar RamachandraApr 7, 2013
  79. John KeepingApr 7, 2013
  80. Ramkumar RamachandraApr 7, 2013
  81. John KeepingApr 7, 2013
  82. Ramkumar RamachandraApr 7, 2013
  83. John KeepingApr 7, 2013
  84. Ramkumar RamachandraApr 7, 2013
  85. John KeepingApr 7, 2013
  86. Jens LehmannApr 7, 2013
  87. Ramkumar RamachandraApr 7, 2013
  88. Jens LehmannApr 7, 2013
  89. Ramkumar RamachandraApr 7, 2013
  90. John KeepingApr 7, 2013
  91. Ramkumar RamachandraApr 7, 2013
  92. Ramkumar RamachandraApr 7, 2013
  93. Jonathan NiederApr 7, 2013
  94. Ramkumar RamachandraApr 7, 2013
  95. Jens LehmannApr 8, 2013
  96. Ramkumar RamachandraApr 8, 2013
  97. Jonathan NiederApr 8, 2013
  98. Ramkumar RamachandraApr 8, 2013
  99. Duy NguyenApr 8, 2013
  100. Ramkumar RamachandraApr 8, 2013
  101. Duy NguyenApr 8, 2013
  102. Ramkumar RamachandraApr 8, 2013
  103. Junio C HamanoApr 8, 2013
  104. Ramkumar RamachandraApr 8, 2013
  105. Junio C HamanoApr 8, 2013
  106. Ramkumar RamachandraApr 8, 2013
  107. Junio C HamanoApr 8, 2013
  108. Ramkumar RamachandraApr 8, 2013
  109. Junio C HamanoApr 8, 2013
  110. Ramkumar RamachandraApr 8, 2013
  111. Philip OakleyApr 10, 2013
  112. Ramkumar RamachandraApr 8, 2013
  113. Jakub NarębskiApr 9, 2013
  114. Ramkumar RamachandraApr 8, 2013
  115. Jonathan NiederApr 8, 2013
  116. Ramkumar RamachandraApr 8, 2013
  117. Junio C HamanoApr 8, 2013
  118. Junio C HamanoApr 8, 2013
  119. Duy NguyenApr 17, 2013
  120. Ramkumar RamachandraApr 17, 2013
  121. Duy NguyenApr 17, 2013
  122. Ramkumar RamachandraApr 17, 2013
  123. Duy NguyenApr 17, 2013
  124. Ramkumar RamachandraApr 17, 2013
  125. Philip OakleyApr 17, 2013
  126. Ramkumar RamachandraApr 18, 2013
  127. Jens LehmannApr 19, 2013
  128. Junio C HamanoApr 17, 2013
  129. Jens LehmannApr 8, 2013
  130. Jeff KingApr 8, 2013
  131. John KeepingApr 7, 2013
  132. Ramkumar RamachandraApr 7, 2013
  133. Ramkumar RamachandraApr 7, 2013
  134. Ramkumar RamachandraApr 7, 2013
  135. Ramkumar RamachandraApr 7, 2013
  136. Ramkumar RamachandraApr 7, 2013
  137. Ramkumar RamachandraApr 7, 2013
  138. Ramkumar RamachandraApr 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.