Bug with "git submodule update" + subrepo with differing path/name?
- From
- Andreas 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.gitAnd 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