From: Ricardo Abreu <ricardolafabreu@gmail.com>
To: scott@tannewt.org
Cc: git@vger.kernel.org
Subject: Re: Submodule update fetching with outer repo's default branch
Date: Tue, 28 Nov 2023 18:32:53 +0000 [thread overview]
Message-ID: <20231128183253.134480-1-ricardolafabreu@gmail.com> (raw)
In-Reply-To: <111c2777-6fd4-45ab-8418-9d064999661c@app.fastmail.com>
I have the same problem. Here is a generic recipe to reproduce, assuming a repository X with a submodule Y (set with an `https` URL):
1. `git clone ... X`
2. `cd X`
3. `git submodule sync`
4. `git submodule update --init --recursive`
5. `git remote rename origin remotex` # rename the remote in X, not Y
6. Elsewhere, add a new commit to Y and create a branch "update-y" in X, pointing the submodule to that commit. Suppose the hash of the new commit in Y is `abc1abc`.
7. `git fetch remotex`
8. `git checkout update-y`
9. `git submodule sync`
10. `GIT_TRACE=1 git submodule update --init --recursive`
- observe:
* the command in the last trace message to be `git fetch remotex abc1abc` (should be `git fetch origin abc1abc`, because that is still the name of the submodule's remote)
* the wrong error message complaining about 'file' protocol (which isn't involved anywhere)
prev parent reply other threads:[~2023-11-28 18:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 23:57 Submodule update fetching with outer repo's default branch Scott Shawcroft
2023-11-28 18:32 ` Ricardo Abreu [this message]
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=20231128183253.134480-1-ricardolafabreu@gmail.com \
--to=ricardolafabreu@gmail.com \
--cc=git@vger.kernel.org \
--cc=scott@tannewt.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).