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

Re: Composing git repositories

From
Jens Lehmann <jens.lehmann@web.de>
Date
Mar 28, 2013, 20:25 UTC
Message-ID
<5154A725.7030609@web.de>
In-Reply-To
<CALkWK0=GcxBh9o+sF1Q8t6SC0JU=NmPyRg6tqaOKmkJ6qDvRCA@mail.gmail.com>
Am 28.03.2013 12:48, schrieb Ramkumar Ramachandra:
Show 14 quoted lines
> Okay, here's a first draft of the new design.  The new mediator object
> should look like:
> 
>     name = git
>     ref = v1.7.8
> 
> The name is looked up in refs/modules/<branch>, which in turn looks like:
> 
>     [submodule "git"]
>         origin = gh:artagnon/git
>         path = git
>     [submodule "magit"]
>         origin = gh:magit/magit
>         path = git/extensions/magit

What happens when you rename "magit" to "foo" in that branch and want to check out an older commit of the same branch? That is one of the reasons why that belongs in to a checked in .gitmodules and not someplace untracked.

> This solves the two problems that I brought up earlier:
> - Floating submodules (which are _necessary_ if you don't want to
> propagate commits upwards to the root).

If you don't want that either don't use submodules or set the ignore config so you won't be bothered with any changes to the submodules. Floating up to the submodule's tip can be easily achieved with a script (possibly checked in in the superproject). You loose the reproducibility by doing that, but that's what you asked for. No problem here.

> - Initializing a nested submodule without having to initialize all the
> submodules in the path leading up to it.

You cannot access a nested sub-submodule without its parent telling you what submodules it has. Otherwise the first level submodule would not be self-contained, so you'll need to check it out too to access the sub-submodules. Nothing to fix here either.

> However, I suspect that we can put more information the mediator
> object to make life easier for the parent repository and make seams
> disappear.  I'm currently thinking about what information git core
> needs to behave smoothly with submodules.

To me your proposal is trying to fix non-issues and breaking stuff that works, so I see no improvement.

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 11 of 43 in “Composing git repositories”
  1. Ramkumar RamachandraMar 26, 2013
  2. Junio C HamanoMar 26, 2013
  3. Ramkumar RamachandraMar 27, 2013
  4. Junio C HamanoMar 27, 2013
  5. Ramkumar RamachandraMar 27, 2013
  6. Junio C HamanoMar 27, 2013
  7. Jonathan NiederMar 27, 2013
  8. Junio C HamanoMar 27, 2013
  9. Jonathan NiederMar 27, 2013
  10. Ramkumar RamachandraMar 28, 2013
  11. Jens LehmannMar 28, 2013
  12. Ramkumar RamachandraMar 28, 2013
  13. Jonathan NiederMar 28, 2013
  14. Jens LehmannMar 28, 2013
  15. Jens LehmannMar 27, 2013
  16. Ramkumar RamachandraMar 28, 2013
  17. Jens LehmannMar 28, 2013
  18. Ramkumar RamachandraMar 31, 2013
  19. Jonathan NiederMar 31, 2013
  20. Ramkumar RamachandraApr 2, 2013
  21. Jeff KingApr 2, 2013
  22. Ramkumar RamachandraApr 2, 2013
  23. Jens LehmannApr 2, 2013
  24. Junio C HamanoApr 2, 2013
  25. Junio C HamanoApr 4, 2013
  26. Duy NguyenApr 5, 2013
  27. Junio C HamanoApr 5, 2013
  28. Duy NguyenApr 5, 2013
  29. Jens LehmannApr 5, 2013
  30. Phil HordMar 31, 2013
  31. Jens LehmannApr 1, 2013
  32. Phil HordApr 1, 2013
  33. Ramkumar RamachandraApr 2, 2013
  34. Jonathan NiederApr 2, 2013
  35. Junio C HamanoApr 2, 2013
  36. Ramkumar RamachandraApr 2, 2013
  37. Jonathan NiederApr 2, 2013
  38. Ramkumar RamachandraApr 2, 2013
  39. Ramkumar RamachandraApr 2, 2013
  40. Jens LehmannApr 2, 2013
  41. Jens LehmannApr 1, 2013
  42. Seth RobertsonApr 1, 2013
  43. Ramkumar RamachandraApr 2, 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.