Thread (4 messages) flat view 4 messages, 2 authors, 2021-03-01

Re: [BUG?] git submodule update --remote assumes 'origin' remote

From: Sean Barag <hidden>
Date: 2021-03-01 17:22:20

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help