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/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-10-28 15:55:55 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-10-28 15:55:55 +0300
commit440604ad1ba67dcbdd23633765b9140fae4bd4b9 (patch)
tree1fecd6c598d74aec84480b6cd93b57d1bde80159 /lib/api
parent3095ac0ca45b044f2055cbd44654c83891245928 (diff)
Refactor storage path extraction from full repo path
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/internal.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index 8b5d2259b45..ccf181402f9 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -20,12 +20,7 @@ module API
def project_path
@project_path ||= begin
project_path = params[:project].sub(/\.git\z/, '')
-
- Gitlab.config.repositories.storages.each do |_, storage_path|
- project_path.sub!(storage_path, '')
- end
-
- project_path
+ Repository.remove_storage_from_path(project_path)
end
end