summaryrefslogtreecommitdiff
path: root/lib/gitlab/regex.rb
diff options
context:
space:
mode:
authormk <mk@infomantis.de>2014-03-06 14:08:40 +0100
committermk <mk@infomantis.de>2014-03-06 14:08:40 +0100
commit61a72bc2e22548e7c216cf4499ced0841ff521cf (patch)
tree65090969e49f15bcdc2b50611f6c7cfbb557f529 /lib/gitlab/regex.rb
parent0004aafe37fc9d0ae63e9e1ebe8c88e10bc23433 (diff)
downloadgitlab-ce-61a72bc2e22548e7c216cf4499ced0841ff521cf.tar.gz
Allow underscore as the first char for project names.
Not sure if the default_regex really has to be expanded for this special use case. We tried to extend only the project_name_regex first, but that didn't help.
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r--lib/gitlab/regex.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index d18fc8bf2ce..e932b64f4f0 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -7,7 +7,7 @@ module Gitlab
end
def project_name_regex
- /\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/
+ /\A[a-zA-Z0-9_][a-zA-Z0-9_\-\. ]*\z/
end
def name_regex
@@ -49,7 +49,7 @@ module Gitlab
protected
def default_regex
- /\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/
+ /\A[.?]?[a-zA-Z0-9_][a-zA-Z0-9_\-\.]*(?<!\.git)\z/
end
end
end