Re: [PATCH] git-submodule - register module url if adding in place
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 8, 2008, 11:34 UTC
- Message-ID
- <alpine.DEB.1.00.0807081332580.4319@eeepc-johanness>
- In-Reply-To
- <1215484630-3784-1-git-send-email-mlevedahl@gmail.com>
Hi,
On Mon, 7 Jul 2008, Mark Levedahl wrote:
Show 6 quoted lines
> When adding a new submodule in place, meaning the user created the > submodule as a git repo in the tree first, we don't go through git > submodule init to register the module. Thus, the url is not stored in > .git/config, and no git operation will ever do so. In this case, assume > the url the user supplies to git add is the one that should be > registered, and do so.
I agree with Sylvain here, namely that this is too dangerous. Imagine this very valid scenario:
$ git clone <somewhere> abc $ git submodule add abc
Bummer.
Yes, happened to me.
So I'd like this to be an error, not something that tries to be helpful, when it clearly cannot be.
Ciao, Dscho