From: Andy Wharton <awharton1976@gmail.com>
To: git@vger.kernel.org
Subject: Expected behaviour of 'git submodule update --remote --recursive'?
Date: Sat, 2 Jan 2021 17:45:55 +0000 [thread overview]
Message-ID: <CANUvzQ12V1ptr9uEpXFnJQWcWgjs4+vTjgaXTMrsJ6foAMpv2Q@mail.gmail.com> (raw)
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.
reply other threads:[~2021-01-02 17:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANUvzQ12V1ptr9uEpXFnJQWcWgjs4+vTjgaXTMrsJ6foAMpv2Q@mail.gmail.com \
--to=awharton1976@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).