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

Re: Possible bug: Git submodules can get into broken state

From
CWChris Wilson <chris@aptivate.org>
Date
Apr 4, 2013, 20:40 UTC
Message-ID
<alpine.DEB.2.02.1304042138100.965@lap-x201.fen.aptivate.org>
In-Reply-To
<7vmwtei1wu.fsf@alter.siamese.dyndns.org>
Hi Junio,
On Thu, 4 Apr 2013, Junio C Hamano wrote:
Show 11 quoted lines
>> This state is broken (wrong URLs in .git/config), and AFAIK there's
>> nothing you can do to check out these submodules without either:
>>
>> (a) manually hacking them out of .git/config, or
>
> I do not think updating the config is "hacking", but is a perfectly
> normal thing to do for a submodule user who wants to use a custom
> URL different from what is recorded in .gitmodules (even when the
> URL in .gitmodules is _working_, you may have a closer mirror you
> would prefer to use, for example).  It is how the configuration is
> designed to be used, if I am not mistaken.

It may be possible, but there's no easy command to do it, especially in automated (fabric) deployment scripts. I do not want to write an awk/sed script to remove all the submodules from .git/config so that I can successfully run git submodule init again. What other choices do I have?

> So I do not see any breakage here.

I do, it seems bizarre that git submodule init can create this situation but cannot rectify it.

Cheers, Chris.
-- 
Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838
Future Business, Cam City FC, Milton Rd, Cambridge, CB4 1UY, UK

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 7 in “Possible bug: Git submodules can get into broken state”
  1. Chris WilsonApr 4, 2013
  2. Junio C HamanoApr 4, 2013
  3. Chris WilsonApr 4, 2013
  4. Junio C HamanoApr 4, 2013
  5. Chris WilsonApr 4, 2013
  6. Junio C HamanoApr 5, 2013
  7. Jens LehmannApr 4, 2013

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.