From 64edb27aa95cef237564b2f6dad38ba6208f3745 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Nov 2013 16:13:40 +0200 Subject: [PATCH] Extend Gitlab#default_regex. Dont allow project path ends with .git --- app/views/projects/edit.html.haml | 4 +++- lib/gitlab/regex.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index ebe5858..3afc607 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 55aa240..eb6b91e 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_\-\.]*(?