Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-02-04 19:12:47 +0300
committerDouwe Maan <douwe@gitlab.com>2016-02-04 19:12:47 +0300
commitac923b4fb40da88d6c7907d08d4584d5d4a560e2 (patch)
tree79050d2d630b681d1ed97448e497be87c4905328 /lib
parentdfe12649f64bcac76b270a96be04285bbe0c2aa2 (diff)
parent5dc77d7577bf19586f6cd756678d0c2660e7f868 (diff)
Merge branch 'fix/atom-url-issue' into 'master'
Fix atom url issue on projects This MR adds prevents a project to have a path ending in .atom that conflicts with the feed and Adds a migration to migrate old .atom projects to a different path Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3699 See merge request !2651
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/backend/shell.rb2
-rw-r--r--lib/gitlab/regex.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb
index 4c15d58d680..f751458ac66 100644
--- a/lib/gitlab/backend/shell.rb
+++ b/lib/gitlab/backend/shell.rb
@@ -47,7 +47,7 @@ module Gitlab
# new_path - new project path with namespace
#
# Ex.
- # mv_repository("gitlab/gitlab-ci", "randx/gitlab-ci-new.git")
+ # mv_repository("gitlab/gitlab-ci", "randx/gitlab-ci-new")
#
def mv_repository(path, new_path)
Gitlab::Utils.system_silent([gitlab_shell_projects_path, 'mv-project',
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index 5c35c5b1450..ace906a6f59 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -34,12 +34,12 @@ module Gitlab
def project_path_regex
- @project_path_regex ||= /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\.]*(?<!\.git)\z/.freeze
+ @project_path_regex ||= /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\.]*(?<!\.git|\.atom)\z/.freeze
end
def project_path_regex_message
"can contain only letters, digits, '_', '-' and '.'. " \
- "Cannot start with '-' or end in '.git'" \
+ "Cannot start with '-', end in '.git' or end in '.atom'" \
end