diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-07 19:55:03 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-07 19:55:03 +0300 |
commit | a5db7f54252d22e3ecd49786a3fdff7c46658fa3 (patch) | |
tree | 71a947d3274aadf2a2896166a6709174b910a2d0 /lib/api/helpers | |
parent | ba3ce6bd39ffdcc03c1b435c8c69ddfc4ff688e2 (diff) | |
parent | 0b9d56f960e272047ac749cff7a29f2b5f03f7a5 (diff) |
Merge branch '28447-hybrid-repository-storages' into 'master'
Update storage settings to allow extra values per shard
See merge request !9597
Diffstat (limited to 'lib/api/helpers')
-rw-r--r-- | lib/api/helpers/internal_helpers.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb index 080a6274957..2135a787b11 100644 --- a/lib/api/helpers/internal_helpers.rb +++ b/lib/api/helpers/internal_helpers.rb @@ -9,11 +9,11 @@ module API # In addition, they may have a '.git' extension and multiple namespaces # # Transform all these cases to 'namespace/project' - def clean_project_path(project_path, storage_paths = Repository.storages.values) + def clean_project_path(project_path, storages = Gitlab.config.repositories.storages.values) project_path = project_path.sub(/\.git\z/, '') - storage_paths.each do |storage_path| - storage_path = File.expand_path(storage_path) + storages.each do |storage| + storage_path = File.expand_path(storage['path']) if project_path.start_with?(storage_path) project_path = project_path.sub(storage_path, '') |