* Expected behaviour of 'git submodule update --remote --recursive'?
@ 2021-01-02 17:45 Andy Wharton
0 siblings, 0 replies; only message in thread
From: Andy Wharton @ 2021-01-02 17:45 UTC (permalink / raw)
To: git
Hi all,
I have three git repo's:
A imports B as a submodule, and has "branch = ." set for B in .gitmodules
B imports C as a submodule, and has "branch = ." set for C in .gitmodules
I had hoped that checking out a branch in A, and then running 'git
submodule update --remote --recursive' in A would checkout the latest
commit from that branch in the two submodules.
This works as expected for B (checks out the right SHA as a deteched
head), but because I'm left on a detached head the update fails for C
with a "branch configured to inherit branch from superproject"
message.
While I'm guessing this is the expected behaviour, is it possible to
make the "branch = ." option use the branch name from the parent
transitively? Or is there another mechanism I should be using to
achieve what I'm trying to do?
Andy.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-02 17:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-02 17:45 Expected behaviour of 'git submodule update --remote --recursive'? Andy Wharton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).