提交 65c4d667 编写于 作者: E Ethan Zhuang 提交者: Mislav Marohnić

support repos whose name starts with a period

上级 01df764e
......@@ -9,6 +9,11 @@ Feature: hub clone
Then it should clone "git://github.com/hookio/hook.js.git"
And there should be no output
Scenario: Clone a public repo that starts with a period
When I successfully run `hub clone zhuangya/.vim`
Then it should clone "git://github.com/zhuangya/.vim.git"
And there should be no output
Scenario: Clone a public repo with HTTPS
Given HTTPS is preferred
When I successfully run `hub clone rtomayko/ronn`
......@@ -89,3 +94,4 @@ Feature: hub clone
When I successfully run `hub clone dotfiles`
Then the git command should be unchanged
And there should be no output
......@@ -34,7 +34,7 @@ module Hub
# provides git interrogation methods
extend Context
NAME_RE = /\w[\w.-]*/
NAME_RE = /[\w.][\w.-]*/
OWNER_RE = /[a-zA-Z0-9-]+/
NAME_WITH_OWNER_RE = /^(?:#{NAME_RE}|#{OWNER_RE}\/#{NAME_RE})$/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册