Closed gko closed 4 years ago
I am not sure, when I open a file on GitHub, I want exactly the commit/lines, so I can copy the link share to other people, paste into a PR log.
But if it's a branch, the link could easily be broken.
Maybe we can use a config variable in .vimrc
and default to commit link? What do you think?
Hey @gko , thanks for the PR, LGTM. But it seems the URL works for Github and Gitlab but not for Bitbucket. I haven't tried Cgit yet.
Hi @ruanyl, thanks for the remark.
I rewrote the whole thing. Only cgit
left.
I also noticed that bitbucket
actually asks a revision besides ref_name
which makes no sense.
Example:
https://bitbucket.org/gorodinskiy/test/src/?at=test%23123
this doesn't work
however this does: https://bitbucket.org/gorodinskiy/test/src/720e03259f40022ee3db10a5ab0314eae220f86b/?at=test%23123
all done.
@gko the bitbucket URL seems just like this https://bitbucket.org/<user_name>/test/src/test-branch/
, like .../src/<branch_name>
.
@ruanyl fixed.
Although one test case doesn't work: https://bitbucket.org/gorodinskiy/test/src/test%25123%23123%23123%25123
for the branch test%123#123#123%123
but that might be a problem of Bitbucket.
@gko Cool! thanks for the PR.
If it's not master then add it to the url
Based on https://github.com/paulirish/git-open behaviour