提交 3606ab01 编写于 作者: M Mislav Marohnić

Only access ssh_config for hosts other than "github.com"

Assume that "github.com" is not an ssh alias to anywhere else. This
optimizes the most common case in which all remotes in a repository
point to "github.com" in their URLs and in which we can avoid
instantiating SshConfig altogether.
上级 0a6fd699
......@@ -387,7 +387,10 @@ module Hub
def uri_parse uri
uri = URI.parse uri
uri.host = local_repo.ssh_config.get_value(uri.host, :HostName) { uri.host }
if uri.host != local_repo.default_host
ssh = local_repo.ssh_config
uri.host = ssh.get_value(uri.host, :HostName) { uri.host }
end
uri
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册