Subject: Re: [RFC] Submodules in GIT

From: Jakub Narebski <[email-masked]>
Date: Tue, 21 Nov 2006 11:04:46 +0100

Martin Waitz wrote:

> On Tue, Nov 21, 2006 at 01:42:22AM +0100, Jakub Narebski wrote:
>> Perhaps it would be best to join those two subproject support
>> solutions together: "bind" tree/commit mount header in commit
>> object, and "commit" entry in a tree.
> 
> But which is the autoritative source then?
> Does it give any more information?

Both should contain the same information, otherwise repository is corrupt
(is in inconsistent state).

"bind" header in commit objects is meant as a kind of shortcut, to ease
reachability checking (you don't need to recurse into directories).

> The advantage in your proposal would be that submodules would
> be visible immediately when looking at the commit,
> without having to traverse the entire tree.
> This may be worthwhile when showing the combined history of parent
> and submodules.

That was the idea.

> But still this looks like "caching submodule information in the
> commit object" and I do not know if we really want to do that.

Well, we would be repeating information, sure. But we can put additional
information in "bind" header except sha1 of commit and mount point...
although I cannot think what... :)

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git