Commit 64edb27a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 31239d11
...@@ -144,7 +144,9 @@ ...@@ -144,7 +144,9 @@
%span Path %span Path
.controls .controls
.control-group .control-group
= f.text_field :path .input-append
= f.text_field :path
%span.add-on .git
%ul %ul
%li Be careful. Renaming a project's repository can have unintended side effects. %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. %li You will need to update your local repositories to point to the new location.
......
...@@ -44,7 +44,7 @@ module Gitlab ...@@ -44,7 +44,7 @@ module Gitlab
protected protected
def default_regex 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 end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment