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

Re: [RFC] Fourth round of support for cloning submodules

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 24, 2007, 13:52 UTC
Message-ID
<Pine.LNX.4.64.0705241446070.4648@racer.site>
In-Reply-To
<20070524132434.GQ942MdfPADPa@greensroom.kotnet.org>
Hi,
On Thu, 24 May 2007, Sven Verdoolaege wrote:
Show 14 quoted lines
> On Thu, May 24, 2007 at 02:17:27PM +0100, Johannes Schindelin wrote:
> > On Thu, 24 May 2007, Sven Verdoolaege wrote:
> > > I suppose we could just set it to 0.
> > > I also don't think the URL should be associated to a ref.
> > 
> > It does not need to be.
> > 
> > But then, it is sort of a "subref": You could just clone the submodule in 
> > its own right, correct?
> 
> Exactly, but the information we want is not associated to any
> particular revision of the submodule.  It just points to the repo.
> It's also not associated with any revision of the supermodule.
> That information should go in a tracked .gitmodules file.

It is not that expensive to just give the SHA-1 with the URL, and to introduce a new namespace, say

3f... submodule/path^{URL:blablub}

to say that the submodule which is connected in "HEAD:path" is available with the URL "blablub" and just so happens to be at commit "3f..." at the moment. Heck, you can even use this instead of expensive fetches to verify up-to-date, and even more, you can make sure that you are as up-to-date as the remote supermodule.

But then, I do not care about that deeply. Like I said, I haven't followed the discussions, but I really do not understand why an information as essential to a superproject is not contained in something like HEAD:.gitmodules. Git does not have to take it from there, it can still continue to take it from a local config in .git/, but .gitmodules can live in the tree happily, for the pleasure of the tools (if only to initialise the first version of the local config after clone).

Without some very intrusive surgery into the transport code of Git, in 22 patches, which I am not at all comfortable with.

Ciao, Dscho

Previous: Sven VerdoolaegeNext: Sven Verdoolaege
Message 51 of 94 in “[RFC] Fourth round of support for cloning submodules”
  1. skimo@liacs.nlMay 23, 2007
  2. 01/22 git_connect: unset CONFIG_ENVIRONMENT in childskimo@liacs.nl, May 23, 2007
  3. 02/22 Add dump-configskimo@liacs.nl, May 23, 2007
  4. 03/22 git-config: add --remote option for reading config from remote reposkimo@liacs.nl, May 23, 2007
  5. 04/22 http.h: make fill_active_slots a function pointerskimo@liacs.nl, May 23, 2007
  6. 05/22 git-config: read remote config files over HTTPskimo@liacs.nl, May 23, 2007
  7. 06/22 unpack-trees.c: pass cache_entry * to verify_absent rather than just the nameskimo@liacs.nl, May 23, 2007
  8. 07/22 git-read-tree: take --submodules optionskimo@liacs.nl, May 23, 2007
  9. 08/22 unpack-trees.c: assume submodules are cleanskimo@liacs.nl, May 23, 2007
  10. 09/22 Add run_command_v_opt_cd: chdir into a directory before execskimo@liacs.nl, May 23, 2007
  11. 10/22 run-command: optionally clear git environmentskimo@liacs.nl, May 23, 2007
  12. Alex RiesenMay 24, 2007
  13. Shawn O. PearceMay 24, 2007
  14. Alex RiesenMay 24, 2007
  15. 11/22 entry.c: optionally checkout submodulesskimo@liacs.nl, May 23, 2007
  16. Alex RiesenMay 24, 2007
  17. Shawn O. PearceMay 24, 2007
  18. Sven VerdoolaegeMay 24, 2007
  19. Alex RiesenMay 24, 2007
  20. Martin WaitzMay 24, 2007
  21. Shawn O. PearceMay 25, 2007
  22. 12/22 git-checkout: pass --submodules option to git-read-treeskimo@liacs.nl, May 23, 2007
  23. 13/22 git-read-tree: treat null commit as empty treeskimo@liacs.nl, May 23, 2007
  24. 14/22 git_config: add void * for callback dataskimo@liacs.nl, May 23, 2007
  25. 15/22 make redirecting stdout to /dev/null available via run_command_v_optskimo@liacs.nl, May 23, 2007
  26. 16/22 unpack-trees.c: optionally clone submodules for later checkoutskimo@liacs.nl, May 23, 2007
  27. 17/22 entry.c: optionally checkout newly cloned submodulesskimo@liacs.nl, May 23, 2007
  28. Johannes SixtMay 24, 2007
  29. 18/22 git-clone: add --submodules for cloning submodulesskimo@liacs.nl, May 23, 2007
  30. 19/22 test for simple submodule checkout supportskimo@liacs.nl, May 23, 2007
  31. 20/22 checkout_submodule: checkout submodule on forced checkout of submodule dirskimo@liacs.nl, May 23, 2007
  32. 21/22 run-command: optionally redirect stderr to /dev/nullskimo@liacs.nl, May 23, 2007
  33. 22/22 ensure_submodule: fetch missing revisionsskimo@liacs.nl, May 23, 2007
  34. Johannes SchindelinMay 23, 2007
  35. Junio C HamanoMay 24, 2007
  36. Sven VerdoolaegeMay 24, 2007
  37. Shawn O. PearceMay 24, 2007
  38. Sven VerdoolaegeMay 24, 2007
  39. Johannes SchindelinMay 24, 2007
  40. Sven VerdoolaegeMay 24, 2007
  41. Johannes SchindelinMay 24, 2007
  42. Sven VerdoolaegeMay 24, 2007
  43. Johannes SchindelinMay 24, 2007
  44. Sven VerdoolaegeMay 24, 2007
  45. Johannes SchindelinMay 24, 2007
  46. Johannes SixtMay 24, 2007
  47. Johannes SchindelinMay 24, 2007
  48. Sven VerdoolaegeMay 24, 2007
  49. Johannes SchindelinMay 24, 2007
  50. Sven VerdoolaegeMay 24, 2007
  51. Johannes SchindelinMay 24, 2007
  52. Sven VerdoolaegeMay 24, 2007
  53. Johannes SchindelinMay 24, 2007
  54. Lars HjemliMay 24, 2007
  55. Junio C HamanoMay 24, 2007
  56. Lars HjemliMay 24, 2007
  57. Sven VerdoolaegeMay 24, 2007
  58. Linus TorvaldsMay 24, 2007
  59. Sven VerdoolaegeMay 24, 2007
  60. Linus TorvaldsMay 24, 2007
  61. Junio C HamanoMay 24, 2007
  62. Lars HjemliMay 24, 2007
  63. Johannes SchindelinMay 24, 2007
  64. Johannes SchindelinMay 24, 2007
  65. Sven VerdoolaegeMay 25, 2007
  66. Junio C HamanoMay 25, 2007
  67. Sven VerdoolaegeMay 25, 2007
  68. Johannes SchindelinMay 25, 2007
  69. Junio C HamanoMay 24, 2007
  70. Josef WeidendorferMay 25, 2007
  71. Johannes SchindelinMay 25, 2007
  72. Josef WeidendorferMay 25, 2007
  73. Johannes SchindelinMay 25, 2007
  74. Sven VerdoolaegeMay 25, 2007
  75. Johannes SchindelinMay 25, 2007
  76. Josef WeidendorferMay 25, 2007
  77. Johannes SchindelinMay 25, 2007
  78. Linus TorvaldsMay 25, 2007
  79. Josef WeidendorferMay 25, 2007
  80. Johannes SchindelinMay 25, 2007
  81. Josef WeidendorferMay 25, 2007
  82. Jakub NarebskiMay 25, 2007
  83. Johannes SchindelinMay 25, 2007
  84. Santi BéjarMay 24, 2007
  85. Sven VerdoolaegeMay 24, 2007
  86. Lars HjemliMay 24, 2007
  87. Martin WaitzMay 27, 2007
  88. Sven VerdoolaegeMay 27, 2007
  89. Martin WaitzMay 24, 2007
  90. Sven VerdoolaegeMay 24, 2007
  91. Johannes SchindelinMay 24, 2007
  92. Sven VerdoolaegeMay 24, 2007
  93. Petr BaudisMay 24, 2007
  94. Johannes SchindelinMay 24, 2007

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.