Skip to content

:Gbrowse jumps to branch in local repository, not the master branch in the remote repository. #3

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

Open
dreamingbird88 opened this issue Jun 4, 2021 · 1 comment

Comments

@dreamingbird88
Copy link

Hi, few months ago, the command jumped to the master branch in the remote repository, which was good for me since the local change/branch cannot be find in the remote repository. However, in recent days, it changes to "local branch" so I cannot check the unchanged file in remote.

Please switch it back to, or at least allow user to switch it back to remote branch. Specifically
Current jump to url:
https://phabricator.xxx.com/diffusion/O/browse/local_branch_name/path/to/file;local_object_hash

Want to jump to url:
https://phabricator.xxx.com/diffusion/O/browse/master/path/to/file

Thanks.

@jparise
Copy link
Owner

jparise commented Jun 4, 2021

This has actually always been the behavior (and it mirrors vim-rhubarb):

https://github.com/tpope/vim-rhubarb/blob/2590324d7fdaf0c6311fad4ee2a2878acaaec42d/autoload/rhubarb.vim#L269

That being said, I also find this annoying when I'm on a local branch but intending to jump to a master reference.

The considerations:

  • We still want this to work for the times when the local (non-master) branch does exist on the remote, such as when working on a shared feature or release branch.
  • When browsing a range of lines, they could differ between the local (branched) file and the remote (master), giving an inaccurate result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants