Re: Submodules implementation
- From
- Christoph 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