Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening a GitHub PR to a specific branch fails since update #3780

Open
matt-sanders opened this issue Jul 26, 2024 · 3 comments
Open

Opening a GitHub PR to a specific branch fails since update #3780

matt-sanders opened this issue Jul 26, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@matt-sanders
Copy link

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:

  1. Open LazyGit in a directory with an existing git repo with a remote named "origin" hosted on GitHub.
  2. Create a new branch, push some changes
  3. Press O to open the "View create pull request options" menu
  4. Choose the second option "Select branch"
  5. Select a branch, they should all be prefixed here with origin/ and press enter
  6. 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)

@matt-sanders matt-sanders added the bug Something isn't working label Jul 26, 2024
@mark2185
Copy link
Collaborator

Just out of curiosity, is this a PR across forks?

The assumption is that the original repo is on the origin remote, whilst the fork is on upstream, if I'm not mistaken.

@matt-sanders
Copy link
Author

No this is not across forks.

@ricardoprato
Copy link

I have the same problem with bitbucket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants