Subject: Re: submodules' shortcomings, was Re: RFC: display dirty submodule working directory in git gui and gitk

From: Johan Herland <[email-masked]>
Date: Tue, 5 Jan 2010 16:07:45 +0100

On Tuesday 05 January 2010, Heiko Voigt wrote:
> P.S.: Additionally (for my use case) we could add a "hint mechanism"
> which allows git to "guess" a new submodules address. For example in
> case I have all my local clones on
> "[email-masked]:<modulename>.git". Now when a new submodule gets
> seen in .gitmodules it will infer the address from the hint
> configuration and not take the original one from upstream.

This can be achieved today, if the upstream .gitmodules uses relative 
submodule URLs. I normally place super-repo and submodules in a single 
directory on the server, and use submodule URLs of the 
form "../<modulename>.git". Now, downstream developers can "git 
clone --mirror" the repos from my server, and - as long as they 
preserve the directory layout - provide their own complete server 
mirror, without editing .gitmodules. Granted, the existing submodule 
tools don't make working with relative submodule URLs particularily 
easy...

...Johan

-- 
Johan Herland, <[email-masked]>
www.herland.net