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

Location-agnostic submodules

From
PTPierre Thierry <pierre@nothos.net>
Date
Apr 27, 2012, 14:37 UTC
Message-ID
<20120427143710.GA13953@pape.arcanes.fr.eu.org>

I just discovered the workings of the submodule command, and as I have grown to like the fact that a repository is not unique with Git, and specifically that it has no unique or central location, I'm bothered by how submodule works.

Would there be any major issue in having (1) submodule to be able to clone the submodules from the super repository when they are available there and (2) having zero, one or many addresses for each submodule, used as hints (obviously not used when (1) is satisfied)?

When the repository is not bare, the submodules would be found at their place in the tree, nothing difficult here. When the repository is bare, there could be a tree with the bare repositories of the submodules.

This could be done by a new subcommand, that would take a remote as an optional argument, its default being origin, as usual:

$ git submodule clone origin

As I see it, adding this 'clone' subcommand for the case where the repository is not bare couldn't add any compatibility issue, so if I'm right on this point, I'd like to try and implement this soon.

Curiously, Pierre

-- 
pierre@nothos.net
OpenPGP 0xD9D50D8A
Next: Phil Hord
Message 1 of 8 in “Location-agnostic submodules”
  1. Pierre ThierryApr 27, 2012
  2. Phil HordApr 30, 2012
  3. Pierre ThierryApr 30, 2012
  4. Phil HordMay 1, 2012
  5. Philip OakleyMay 1, 2012
  6. Junio C HamanoMay 1, 2012
  7. Philip OakleyMay 1, 2012
  8. Heiko VoigtMay 2, 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.