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

Bug with "git submodule update" + subrepo with differing path/name?

From
AUAndreas Urke <arurke@gmail.com>
Date
Dec 18, 2017, 23:18 UTC
Message-ID
<CAFBGMVPBwxeSXCTcoBdxDbYtJo-38w=tf4T6-rNWuys=3drP+A@mail.gmail.com>
Hi,

I have a repo with two submodules. I regularly use "git submodule update", which works fine for one subrepo, but not for the other. The only relevant difference I can think of between these two subrepos is that the latter one does not have a matching path and name:

$ cat .gitmodules
[submodule "subrepo1"]
    path = subrepo1
    url = git@gitlab.com:subrepo1.git
[submodule "name_subrepo2"]
    path = subrepo2
    url = git@gitlab.com:name_subrepo2.git
And a reproduction looks like this:

$ git --version git version 2.15.1

$ git status HEAD detached at 05412d4 Changes not staged for commit:

modified: subrepo1 (new commits) modified: subrepo2 (new commits)

$ git submodule update Submodule path 'subrepo1': checked out 'e4785498130ec4188bb1745f27e311bff08ed4c8'

$ git status HEAD detached at 05412d4 Changes not staged for commit:

modified:   subrepo2  (new commits)

Checking out the relevant commit manually in subrepo2 works fine (and is what I end up doing).

Regards, Andreas Urke

Next: Stefan Beller
Message 1 of 11 in “Bug with "git submodule update" + subrepo with differing path/name?”
  1. Andreas UrkeDec 18, 2017
  2. Re: Bug with "git submodule update" + subrepo with differing path/name?Stefan Beller, Dec 19, 2017
  3. Junio C HamanoDec 19, 2017
  4. Stefan BellerDec 19, 2017
  5. Andreas UrkeDec 20, 2017
  6. Stefan BellerDec 20, 2017
  7. Andreas UrkeDec 21, 2017
  8. Stefan BellerDec 21, 2017
  9. Andreas UrkeDec 21, 2017
  10. Stefan BellerDec 21, 2017
  11. Stefan BellerDec 21, 2017

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.