-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Is your feature request related to a problem? Please describe.
When creating a PR against a selected branch (via O = "create pull request options"), the suggestion area is populated with all local branches. I'd say that only remote branches should be listed there - it doesn't really make sense to create a PR against a branch that doesn't exist on the remote (at least for Github).
To Reproduce
Steps to reproduce the behavior:
- Checkout local branch
- Press 'O'
- Select '... -> select branch' option
Describe the solution you'd like
Only remote branches are listed as suggestions.
Describe alternatives you've considered
n/a
Additional context
The suggestion function used in createPullRequestMenu() returns all local branches. Simply replacing it with GetRemoteBranchesSuggestionsFunc() doesn't work since the corresponding remote is then included in the branch name (i.e. <remote>/<branch>) - breaking the generated link.
I'd be happy to have a go at fixing this, but I'd need some pointers: I haven't fully grasped yet how the whole "create PR" feature deals with multiple remotes, for example - and whether that must be taken into account. Would a new suggestion function that lists remote branches without the <remote>/ prefix (and possibly for origin only) do the trick?