knsh14 / vim-github-link

generate github link from selected lines in vim
MIT License
62 stars 15 forks source link

Incorrect remote repository when used with 2 distinct remotes #18

Open SAtacker opened 1 year ago

SAtacker commented 1 year ago

Description

I have configured my repository to have 2 remotes.

$ git remote -v
origin  git@github.com:STEllAR-GROUP/hpx.git (fetch)
origin  git@github.com:STEllAR-GROUP/hpx.git (push)
satacker    git@github.com:SAtacker/hpx.git (fetch)
satacker    git@github.com:SAtacker/hpx.git (push)

However I get the following link when I am checked out on a branch tracking satacker remote and not origin. image Using all the Get* commands I am not getting the expected link.

Link I get - https://github.com/STEllAR-GROUP/hpx/blob/38f850e99cba5a3f65555d02c39aa3c1479c1914/examples/1d_stencil/1d_stencil_4_parallel_any_sender.cpp#L157-L199

Link I expect: https://github.com/SAtacker/hpx/blob/38f850e99cba5a3f65555d02c39aa3c1479c1914/examples/1d_stencil/1d_stencil_4_parallel_any_sender.cpp#L157-L199

Thanks for this plugin!

Sleepful commented 1 year ago

perhaps for now you can simply clone the repo in a new directory where you have a single git remote, for navigation/copy_pasting purposes 🤔 would be awesome to support multiple remotes

Sleepful commented 1 year ago

found this too https://github.com/ruanyl/vim-gh-line#working-with-multiple-remotes