open-on-github icon indicating copy to clipboard operation
open-on-github copied to clipboard

When on a local branch that doesn't exist on Github, plugin defaults to branch "master" even when the repo's default branch is not "master"

Open henrebotha opened this issue 8 years ago • 6 comments

The repo I work in the most uses staging as the name of the default branch instead of master. If I check out a local branch that doesn't exist on Github and I do "Open on Github: Blame", the URL points to the master branch instead of staging - and consequently fails to find the commit.

henrebotha avatar May 13 '16 15:05 henrebotha

I can reproduce the issue even if a remote branch exists with that name.

claudiodangelis avatar Jun 03 '16 10:06 claudiodangelis

Would be cool if default branch can be configured.

Also noticed that File opens master branch and Copy url copies current commit url. Unexpected.

umpirsky avatar Jul 07 '16 09:07 umpirsky

I also have the same problem even when the branch exists on github, and I wonder if this package is just abandoned?

antonpaisov avatar Jul 26 '17 10:07 antonpaisov

lol, I think my problem might be because I have / in the branch name :) will check

antonpaisov avatar Jul 26 '17 10:07 antonpaisov

@antonpaisov I have joined the Dark Side and work in Vim exclusively now. Join me, young padawan...

henrebotha avatar Jul 26 '17 10:07 henrebotha

I have the same problem, and I use a 'standard' repo with main as the default branch. I'm happy to make a PR to fix this

elliotaplant avatar Mar 09 '22 00:03 elliotaplant