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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 5, 2013, 16:51 UTC
Message-ID
<7vmwtcdip8.fsf@alter.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.2.02.1304042302550.965@lap-x201.fen.aptivate.org>
Chris Wilson <chris+gitscm@aptivate.org> writes:
Show 12 quoted lines
> They fixed it by checking in a rectified .gitmodules file.
>
> In the mean time, I ran git submodule init, and now I've ended up in a
> situation where git submodule update doesn't work, and there's no
> submodule command to fix it, so I have to remove the broken submodules
> from .git/config.
>
>> and the configuration mechanism is the way to use custom URL in
>> place of it.
>
> I don't want to use a custom URL, I want to use the URL which is now
> in .gitmodules.
Then don't call it a "custom URL" ;-).

Isn't your problem that the old, broken one is now in your config, and you want to update that with a corrected one? How you learned which one is correct does not really matter---you may learned it out of band by looking at upstream's gitweb, or by running "git fetch" in the superproject again and looking at the updated .gitmodules file. The configuration mechanism has a way to update that entry.

> Could submodule init at least change the URLs of submodules which are
> not checked out? (e.g. because they couldn't be)?

Perhaps "submodule deinit" might be what you are looking for, but I dunno.

Previous: Chris WilsonNext: Jens Lehmann
Message 6 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.