Extend Gitlab#default_regex. Dont allow project path ends with .git

Signed-off-by: NDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
上级 31239d11
......@@ -144,7 +144,9 @@
%span Path
.controls
.control-group
= f.text_field :path
.input-append
= f.text_field :path
%span.add-on .git
%ul
%li Be careful. Renaming a project's repository can have unintended side effects.
%li You will need to update your local repositories to point to the new location.
......
......@@ -44,7 +44,7 @@ module Gitlab
protected
def default_regex
/\A[a-zA-Z0-9][a-zA-Z0-9_\-\.]*\z/
/\A[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册