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

Re: Submodules implementation

From
CBChristoph Bartoschek <bartoschek@gmx.de>
Date
Feb 24, 2010, 00:15 UTC
Message-ID
<201002240115.53771.bartoschek@gmx.de>
In-Reply-To
<32541b131002231559r49fc31e0i4ce46869d27190c8@mail.gmail.com>
Am Mittwoch 24 Februar 2010 schrieb Avery Pennarun:
> The data format itself implements submodules as simply pointers to
> commits (not trees) located at a particular point in the supermodule.
> This is very elegant and simple.

I see that in the submodule there is a .git directory with its own objects. This does not look like as if the submodule objects are part of the superproject.

Show 6 quoted lines
> By comparison, my git-subtree tool
> (http://github.com/apenwarr/git-subtree) is the opposite: its data
> storage format isn't very elegant (it just has a tree stored inside
> another tree, as if there were no submodule at all) but its
> implementation makes it easier for end users (since they don't have to
> deal with separate repositories).

This is exaclty how I would expect it. The tree of the submodule has its root somewhere in the tree of the superproject. Then there are commits for the superproject that point to the root of the whole tree and commits for the submodules that point to nodes in the tree. A combined tree looks much more elegant for me.

I'll take a look at your tool.
Christop
Previous: Avery PennarunNext: Junio C Hamano
Message 3 of 4 in “Submodules implementation”
  1. Christoph BartoschekFeb 23, 2010
  2. Avery PennarunFeb 23, 2010
  3. Christoph BartoschekFeb 24, 2010
  4. Junio C HamanoFeb 24, 2010

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.