Subject: Re: [RFC] Submodules in GIT

From: Stephan Feder <[email-masked]>
Date: Fri, 01 Dec 2006 17:04:19 +0100

Martin Waitz wrote:
> hoi :)
> 
> On Fri, Dec 01, 2006 at 03:23:07PM +0100, Stephan Feder wrote:
>> And what is already there is a lot of meta information (see above). You 
>> do not need that.
> 
> What information are you refering to?
> Perhaps you have looked into my old branch?
> The current implementation is in "module2".

I was looking into git-init-module.sh (branch module2). There you set up 
a separate git repository for the submodule and store references to it 
into the supermodules's repository.

> 
>> For example, in the index, if it is a commit (i.e. a subproject), store 
>> the commit id (not the commit's tree id ).
> 
> This is exactly what I have done.
> 
>> Especially, extend update-index to be able to store a commit 
>> instead of the tree.
> 
> Done, except that update-index never stores trees ;-)

Yes, I forgot.

>> Or else, do not change what is recorded in the index. Then, at commit 
>> time, you not only commit the superproject but also all subprojects.
> 
> But then submodules would be handled differently to files which I wanted
> to avoid.

On the other hand, it feels more naturally to only commit at the end of 
your work. So both alternatives have their merits.

> 
>> To push and pull you have to extend the tools as well. That is the next 
>> step.
> 
> Also done.

I hope I have time to give your solution a try.

Regards

Stephan

-- 
b.i.t.
beratungsgesellschaft für informations-technologie mbh
Stephan Feder
elisabethenstr. 62   fon: +49(0)6151/827575
64283 darmstadt      fax: +49(0)6151/827576
mailto:[email-masked]   www: http://www.b-i-t.de