Subject: Re: [RFC] Submodules in GIT

From: Martin Waitz <[email-masked]>
Date: Fri, 1 Dec 2006 23:08:21 +0100

hoi :)

On Fri, Dec 01, 2006 at 09:54:32PM +0000, Andy Parkins wrote:
> On Friday 2006, December 01 21:37, Martin Waitz wrote:
> 
> > > I'm going to guess by reachability analysis, you mean that the
> > > submodule doesn't know that some of it's commits are referenced by the
> > > supermodule.  As I suggested elsewhere in the thread, that's easily
> > > fixed by making a refs/supermodule/commitXXXX file for each
> > > supermodule commit that references as particular submodule commit.
> >
> > I wouldn't call this "easily".
> 
> Of course it is; when you write a supermodule commit you have it's hash, 
> $SUPERMODULE_HASH, you have the commit-hash of the submodule commit you're 
> referencing, $SUBMODULE_HASH.  It's not really hard to do
> 
> echo $SUBMODULE_HASH > 
> submodule/.git/refs/supermodules/commit$SUPERMODULE_HASH

I guess you are aware that you have to scan _all_ trees inside _all_
supermodule commits for possible references.

So what do you do with deleted submodules?
You wouldn't want them to still sit around in your working directory,
but you still have to preserve them.

-- 
Martin Waitz