提交 90628479 编写于 作者: S Stephen Touset 提交者: Chris Wanstrath

Bugfix: Don't assume ".git" on end of git URLs

上级 107afe4f
......@@ -12,7 +12,7 @@ module Hub
REMOTES = Hash.new do |cache, remote|
url = GIT_CONFIG["config remote.#{remote}.url"]
if url && url.to_s =~ %r{\bgithub\.com[:/](.+)/(.+).git$}
if url && url.to_s =~ %r{\bgithub\.com[:/](.+)/(.+?)(.git)?$}
cache[remote] = { :user => $1, :repo => $2 }
else
cache[remote] = { }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册