From: "Sean Barag" <sean@barag.org>
To: git@vger.kernel.org
Subject: Re: [BUG?] git submodule update --remote assumes 'origin' remote
Date: Mon, 01 Mar 2021 09:17:40 -0800 [thread overview]
Message-ID: <58d3b7ba-b65d-432f-872d-adea7fad1317@www.fastmail.com> (raw)
In-Reply-To: <2d58fe40-9e8c-4653-8170-5411fd3cf6f4@www.fastmail.com>
On Mon, Mar 01 2021, Sean Barag wrote:
> I've experimented with
> introducing fallbacks to `remote_for_branch` in `remote.c` [2] as an
> alternative:
>
> 1. use remote tracking branch; or
> 2. if there's only one remote, use that; or
> 3. if config.defaultRemoteName is set, use that; or
> 4. fall back to "origin"
>
> This seems to work (at the very least, no tests fail?), but leaves
> `cd ./some-sm; git remote add foo bar; git remote rename origin baz`
> open to the original behavior.
I forgot to mention that this approach requires `get_default_remote` in
`submodule--helper.c` to use the name of the remote returned by
`remote_get(NULL)`. That was probably obvious to regular mailing list
readers :D
prev parent reply other threads:[~2021-03-01 17:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 15:46 [BUG?] git submodule update --remote assumes 'origin' remote Sean Barag
2021-03-01 16:38 ` Ævar Arnfjörð Bjarmason
2021-03-01 17:13 ` Sean Barag
2021-03-01 17:17 ` Sean Barag [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=58d3b7ba-b65d-432f-872d-adea7fad1317@www.fastmail.com \
--to=sean@barag.org \
--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).