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

Re: A design for subrepositories

From
LALauri Alanko <la@iki.fi>
Date
Oct 14, 2012, 10:19 UTC
Message-ID
<20121014131928.25943ezwa6fveyls.lealanko@webmail.helsinki.fi>
In-Reply-To
<7vzk3p1xh3.fsf@alter.siamese.dyndns.org>
Quoting "Junio C Hamano" <gitster@pobox.com>:
Show 7 quoted lines
>> If the
>> submodules ever get reorganized and foo is moved to ./bar, then it is
>> impossible to check out older versions or alternate branches, since
>> the submodule is no longer where it is expected to be at the origin.
>
> Isn't that exactly what the "module name" vs "module path" mapping
> in .gitmodules file is meant to address?

Yes, and as I showed after the part you quoted, it is possible to refer to a module by name, although it looks like such a hack that I can't imagine it's currently something that git-submodule is intended to support.

>> But still, "git submodule update" only looks at the modules in the
>> currently checked-out tree. If we have other branches or old tags that
>> refer to other submodules, there's no simple way to fetch those, too.
> Didn't I already suggest you to think about how you can improve
> existing "git submodule" to suit your use case better?

Yes, and I listed three possible ways. Two of them seem technically unattractive, whereas one of them (submodules as ref directories) seems like a huge change that could introduce incompatibilities. That is why a separate tool seems like a cleaner choice.

If you want enhancements to git-submodule, at least deign to comment on the issues above.

There is actually a fourth alternative: extend the git protocol so that a remote repository could be queried for its list of submodules. But this seems particularly icky: git is at its core such a low-level framework. Nested repositories are such a high-level concept that something is wrong if the core needs specialized support for it. The ref directories approach, on the other hand, is completely transparent to standard tools.

Lauri
Previous: Junio C HamanoNext: Jens Lehmann
Message 5 of 17 in “A design for subrepositories”
  1. Lauri AlankoOct 13, 2012
  2. Junio C HamanoOct 13, 2012
  3. Lauri AlankoOct 13, 2012
  4. Junio C HamanoOct 14, 2012
  5. Lauri AlankoOct 14, 2012
  6. Jens LehmannOct 14, 2012
  7. Lauri AlankoOct 14, 2012
  8. Jens LehmannOct 14, 2012
  9. Jens LehmannOct 14, 2012
  10. Jens LehmannOct 14, 2012
  11. Junio C HamanoOct 14, 2012
  12. Jens LehmannOct 14, 2012
  13. A design for distributed submodulesLauri Alanko, Oct 19, 2012
  14. Jens LehmannOct 19, 2012
  15. Lauri AlankoOct 14, 2012
  16. Jens LehmannOct 15, 2012
  17. perryh@pluto.rain.comOct 13, 2012

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.