Open sarmong opened 2 weeks ago
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.
Current implementation uses
git config --get remote.origin.url
which is problematic when there is aninsteadOf
in git config.E.g. I have this:
So,
git config --get remote.origin.url
returnsgh:user/repo
and thus fails to open in a URL. Whereasgit remote get-url origin
will return HTTP or SSH url, that can be then used.