git-blame.nvim
git-blame.nvim copied to clipboard
Get remote url with `git remote get-url`
Current implementation uses git config --get remote.origin.url which is problematic when there is an insteadOf in git config.
E.g. I have this:
[url "[email protected]:"]
insteadOf = "gh:"
So, git config --get remote.origin.url returns gh:user/repo and thus fails to open in a URL. Whereas git remote get-url origin will return HTTP or SSH url, that can be then used.
Hi, yeah this makes sense. Maybe we could convert such behaviors into configurable ones via some strategy enums? I think there was a similar case a while ago that would benefit from this approach
I am not sure what would be the usecase of using url from config instead of remote get-url.
For example gitlinker.nvim does it this way and I haven't seen any issues raised there.
@f-person I have this same problem. The fix is a one line change. I'm willing to submit a pull request if that'd get this fixed sooner!