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

Re: [RFC] Submodules in GIT

From
Shawn Pearce <spearce@spearce.org>
Date
Nov 21, 2006, 07:21 UTC
Message-ID
<20061121072137.GC3332@spearce.org>
In-Reply-To
<20061120215116.GA20736@admingilde.org>
Martin Waitz <tali@admingilde.org> wrote:
> I am currently working on adding submodule support to GIT.
> Here I am presenting some prototyping work to show how submodules could
> be implemented in GIT.
Aside from a GUI for Git that I can give to a non-technical
user and have them be productive with (and without getting "this
sucks!" complaints from them), submodule support is the next highest
priority feature for me in Git.  So as soon as I can get git-gui
to that point I'll probably redirect as much of my "Git time"
as I can to testing your submodule implementation.
 
Show 6 quoted lines
> When a merge in the parent has to resolve changes in the submodule,
> then it does exactly the same as for files: at first it is tried to resolve
> it in the index and if this is not possible it will have store stages 1-3
> in the index and tries a content merge.  The only difference with submodules
> is that the content merge is not possible with a simple diff3 call, but
> that the GIT merge machinery has to recurse into the submodule.
Right.  And what's really cool about that is many times a subproject
merge will be trivial, so top level project merges will be still be
trivial in index merges.  But what's complicated about that is you
need to make sure the subproject working directory is fast-forwarded
to the new commit.  :)
 
> The most important next step is to commit to some object database format
> for submodules.  So please, do give feedback about the proposed changes
> to the tree object.

I think the S_IFSOCK approach is the right way to go here, and thus I'm reasonably happy with this repository format. But Linus and Junio do tend to be better at this than I... :-)

Previous: Jakub NarebskiNext: Petr Baudis
Message 3 of 10 in “[RFC] Submodules in GIT”
  1. Martin WaitzNov 20, 2006
  2. Jakub NarebskiNov 20, 2006
  3. Shawn PearceNov 21, 2006
  4. Petr BaudisNov 22, 2006
  5. Jakub NarebskiDec 2, 2006
  6. Robin RosenbergDec 3, 2006
  7. Jakub NarebskiDec 3, 2006
  8. Robin RosenbergDec 3, 2006
  9. Jakub NarebskiDec 3, 2006
  10. Jakub NarebskiDec 3, 2006

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.