summaryrefslogtreecommitdiff
path: root/lib/gitlab/repo_path.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-27 15:08:16 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-27 15:08:16 +0000
commitfb73ca3398c2ac49a616ab553e117b0586089702 (patch)
treec2f787ac97df38569c59cd0e967331ec1ead6d7e /lib/gitlab/repo_path.rb
parentb6b8f7dc871e73f29af55f06a773136a7242df57 (diff)
downloadgitlab-ce-fb73ca3398c2ac49a616ab553e117b0586089702.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/repo_path.rb')
-rw-r--r--lib/gitlab/repo_path.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/repo_path.rb b/lib/gitlab/repo_path.rb
index 030e50dfbf6..1baa2a9e461 100644
--- a/lib/gitlab/repo_path.rb
+++ b/lib/gitlab/repo_path.rb
@@ -32,9 +32,12 @@ module Gitlab
def self.find_project(project_path)
project = Project.find_by_full_path(project_path, follow_redirects: true)
- was_redirected = project && project.full_path.casecmp(project_path) != 0
- [project, was_redirected]
+ [project, redirected?(project, project_path)]
+ end
+
+ def self.redirected?(project, project_path)
+ project && project.full_path.casecmp(project_path) != 0
end
end
end