浏览代码

git-url: handle ssh host rewrites for github.com

raylu 7 年之前
父节点
当前提交
ac7c55643f
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      git-url

+ 2 - 0
git-url

@@ -34,6 +34,8 @@ if remote_url.endswith('.git'):
 	remote_url = remote_url[:-len('.git')]
 parsed = urllib.parse.urlparse(remote_url)
 hostname = parsed.hostname
+if hostname.startswith('github.com-'):
+	hostname = 'github.com'
 
 obj_type = 'tree'
 if len(sys.argv) == 2: