From: Dmitriy Zaporozhets Date: Wed, 13 Nov 2013 14:13:40 +0000 (+0200) Subject: Extend Gitlab#default_regex. Dont allow project path ends with .git X-Git-Tag: v6.3.0~45 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=64edb27aa95cef237564b2f6dad38ba6208f3745;p=wvm%2Fgitlab.git Extend Gitlab#default_regex. Dont allow project path ends with .git Signed-off-by: Dmitriy Zaporozhets --- diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index ebe585815..3afc607d9 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -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. diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index 55aa240a9..eb6b91e26 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -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_\-\.]*(?