neoclide/coc-git

remote url detection can fail to detect github remotes

arcnmx opened this issue · 0 comments

git remote get-url returns a modified url, as documented:

Configurations for insteadOf and pushInsteadOf are expanded here.

In some configurations, this may prevent detection of github remotes - changing the url from github.com to a mirror or ssh HostName alias. Some alternatives and suggestions are:

  1. use git config --get remote.${remoteName}.url instead of (or in addition to) remote get-url
  2. a github.hosts configuration setting (similar to gitlab) could help - however, the hostname will not actually be valid for use with the github API, so would only be for detection of github repos.
  3. allow users to explicitly override the detection logic using git config --get remote.${remoteName}.github_repo and github_owner or something