Prefer origin if there are multiple remotes #458

Merged
6543 merged 2 commits from arkamar/tea:prefer-origin-remote into master 2022-03-09 01:35:52 +00:00
Contributor

Usually, origin is the name of a default remote, which corresponds with upstream. This change improves remote selection when non of main, master nor trunk local branches is present.

Usually, `origin` is the name of a default remote, which corresponds with upstream. This change improves remote selection when non of `main`, `master` nor `trunk` local branches is present.
arkamar added 1 commit 2022-02-16 14:42:12 +00:00
Prefer origin if there is multiple remotes
Usually, "origin" is the name of a default remote, which corresponds
with upstream. This change improves remote selection when non of "main",
"master" nor "trunk" local branches is present.
All checks were successful
continuous-integration/drone/pr Build is passing
09797f111a
arkamar changed title from Prefer origin if there is multiple remotes to Prefer origin if there are multiple remotes 2022-02-19 17:38:40 +00:00
6543 approved these changes 2022-02-22 14:36:23 +00:00
6543 added this to the v0.9.0 milestone 2022-02-22 14:36:29 +00:00
6543 added the
kind
enhancement
label 2022-02-22 14:36:39 +00:00
lunny approved these changes 2022-02-24 08:54:02 +00:00
lunny added 1 commit 2022-02-24 08:54:25 +00:00
Merge branch 'master' into prefer-origin-remote
All checks were successful
continuous-integration/drone/pr Build is passing
6538061635
6543 merged commit fb3e1f75e9 into master 2022-03-09 01:35:52 +00:00
Member

I don't think this change is correct, but I didn't find the time to verify yet (Instead I got sidetracked with https://github.com/go-gitea/gitea/pull/19030 when checking in on this yesterday ?). Will try to check this out today

I don't think this change is correct, but I didn't find the time to verify yet (Instead I got sidetracked with https://github.com/go-gitea/gitea/pull/19030 when checking in on this yesterday ?). Will try to check this out today
noerw self-assigned this 2022-03-09 10:55:38 +00:00
noerw added the
kind/breaking
skip-changelog
labels 2022-03-10 12:27:02 +00:00
Member

After checking this out, I indeed consider this a bad change. See my reasoning in #466, where I propose a different approach

After checking this out, I indeed consider this a bad change. See my reasoning in #466, where I propose a different approach
arkamar deleted branch prefer-origin-remote 2022-03-18 10:26:57 +00:00
Author
Contributor

Just to advocate this PR a little bit more, I tried to do the change least invasive, therefore main, master and trunk branches are still preferred for remote selection, but origin is used if non of those is present. This change does not break previous behavior, because user cannot easily predict which remote will be selected if non of previously mentioned branches is present. I don't consider it as a bad change, it really improves default behavior and user experience.

Anyway, this being said, I do like the change in #466, but except of upstream addition nothing in remote selection priority has been changed.

Just to advocate this PR a little bit more, I tried to do the change least invasive, therefore `main`, `master` and `trunk` branches are still preferred for remote selection, but `origin` is used if non of those is present. This change does not break previous behavior, because user cannot easily predict which remote will be selected if non of previously mentioned branches is present. I don't consider it as a *bad change*, it really improves default behavior and user experience. Anyway, this being said, I do like the change in #466, but except of `upstream` addition nothing in remote selection priority has been changed.
Sign in to join this conversation.
No description provided.