Subject: Re: [RFC] Third round of support for cloning submodules

From: Martin Waitz <[email-masked]>
Date: Mon, 21 May 2007 00:52:53 +0200

hoi :)

On Sun, May 20, 2007 at 08:04:33PM +0200, [email-masked] wrote:
> This patch series implements a mechanism for cloning submodules.
> Each submodule is specified by a 'submodule.<submodule>.url'
> configuration option, e.g.,
> 
> bash-3.00$ ./git-config --remote=http://www.liacs.nl/~sverdool/isa.git --get-regexp 'submodule\..*\.url' 
> submodule.cloog.url /home/sverdool/public_html/cloog.git
> submodule.cloog.url http://www.liacs.nl/~sverdool/cloog.git

I really think we should try to find one standard method to
automatically find the right parent repository for a submodule,
based on the supermodules parent repository.

So e.g. that the submodule repository should stay in the same directory
or in some special subdirectory of the supermodule or even in the
same object store.
Then we can add a configuration layor on top, but there should always
be a sane default.

Things we have to think about:
 * we have to cope with moving / disappearing repositories.
 * we should support bare repositories even for superprojects.
   This can be done either by including the submodule objects in
   the bare repository directly or by linking them (e.g. with your
   config implementation)
 * we have to keep old submodules around forever,
   at least when we want to be able to recover old versions.
   Of course this is not required for all working copies as people
   only want to have a subset of needed modules.
   But for central synchronization repositories (probably the bare ones)
   this is really important.
 * If you remove the whole working directory I don't want to loose any
   data which is already committed, including submodules.

That leads to submodules which store their objects within the
supermodule .git directory, which would automatically obsolete the
need to specify explicit submodule URLs.  But I'm not quite sure
on how to really do this, despite having experimented a bit with it
(my module3 branch should still contain some brainstorming and code).

So back to your code: I don't like absolute URLs in the cloneable part
of the repository.  We should try to stay with relative ones which
can stay the same everywhere.

-- 
Martin Waitz