archive mirror
 help / color / mirror / Atom feed
From: "Sean Barag" <>
Subject: Re: [BUG?] git submodule update --remote assumes 'origin' remote
Date: Mon, 01 Mar 2021 09:17:40 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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

      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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* 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).