git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Mark LevedahlNext: Mark Levedahl
Message 2 of 4 in “git-submodule - register module url if adding in place”
  1. git-submodule - register module url if adding in placeMark Levedahl, Jul 8, 2008
  2. Johannes SchindelinJul 8, 2008
  3. Mark LevedahlJul 8, 2008
  4. Johannes SchindelinJul 9, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.