Opening a GitHub PR to a specific branch fails since update #3780
Description
Describe the bug
I've recently upgraded LazyGit from 0.38.2 to 0.43.1. On 0.38.2 I would create a pull request to a specific branch using O
, select my branch, and press enter. This would open a url like this: https://github.com/<org>/<repo>/compare/<base>...<compare>?expand=1
. Since the update, I've noticed that my options all contain origin/
at the beginning of the base. This results in the following URL: https://github.com/<org>/<repo>/compare/origin%2F<base>...<compare>?expand=1
and GitHub gives me a page saying there is nothing to compare. If I remove the origin%2F
then it works as expected.
Is this maybe a config that's changed recently?
To Reproduce
Steps to reproduce the behavior:
- Open LazyGit in a directory with an existing git repo with a remote named "origin" hosted on GitHub.
- Create a new branch, push some changes
- Press
O
to open the "View create pull request options" menu - Choose the second option "Select branch"
- Select a branch, they should all be prefixed here with
origin/
and press enter - Notice the page from GitHub saying "nothing to compare"
Expected behavior
It should open a PR creation page correctly.
Version info:
commit=, build date=, build source=homebrew, version=0.43.1, os=darwin, arch=arm64, git version=2.39.3 (Apple Git-145)
git version 2.39.3 (Apple Git-145)