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

Partial checkouts / submodules

From
Finn Arne Gangstad <finnag@pvv.org>
Date
Nov 20, 2007, 15:59 UTC
Message-ID
<20071120155922.GA6271@pvv.org>

My use case it this: We have some huge projects (let's call them supermodules) that are the only products we really release. Any change going into any of the submodules go in solely to modify the superproject, the submodules are not released on their own.

We cannot keep the supermodule with all its submodules in one git repository for two reasons: Size & sharing. A 6GB+ repository is too big to handle gracefully, and there are multiple superprojects sharing some of the submodules. Our supermodules typically contains 50-250 submodules. Usually it is sufficient to look at just a few of these submodules at the same time.

I looked into the current git submodules to see if they support what I think we need, but it seems like they do not really cut it (If I'm wrong about this, please educate me).

What I want is this: 
Somewhere the following modules all exist:
supermodule/
   submodule1
   submodule2
   submodule3
    ...
   submodule200

You pull the supermodule, and initialize random collection of submodules, e.g. locally you have:

supermodule/
   submodule13
   submodule71
   submodule102

Now I want this to behave as if it was a partial checkout of "supermodule" - i.e. I want _all_ operations in any of the submodules to act as if they happened in all the submodules (as if supermodule was a single repository containing all the submodules directly).

If I do a change in submodule13, another change in submodule71 and yet another change in submodule102, I want to be able to commit them all as ONE commit (obviously it will be 4 commits, 1 in each submodule and one in the supermodule, but anyone looking at this in the context of this supermodule should see it as one commit).

If I pull supermodule, I get updates to supermodule, submodule13, submodule71 and submodule102, but nothing else.

If I make a branch on submodule71, the branch is made in all submodules & the supermodule.

With this setup it should be possible to handle supermodule as a normal module with branches for each feature/topic/bugfix, and those features being merged into other branches in a reasonable way. Does something like this look doable?

- Finn Arne
Next: Sven Verdoolaege
Message 1 of 13 in “Partial checkouts / submodules”
  1. Finn Arne GangstadNov 20, 2007
  2. Sven VerdoolaegeNov 20, 2007
  3. Finn Arne GangstadNov 20, 2007
  4. Sven VerdoolaegeNov 20, 2007
  5. Daniel BarkalowNov 20, 2007
  6. Finn Arne GangstadNov 20, 2007
  7. Daniel BarkalowNov 20, 2007
  8. Jakub NarebskiNov 21, 2007
  9. Daniel BarkalowNov 20, 2007
  10. Steven GrimmNov 20, 2007
  11. Daniel BarkalowNov 20, 2007
  12. Sergei OrganovNov 20, 2007
  13. Daniel BarkalowNov 20, 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.