Commit 78823675 authored by Gabriel Mazetto's avatar Gabriel Mazetto
Browse files

Prevent using gitlab import task when hashed storage is enabled

parent b409379b7fa6
......@@ -11,6 +11,12 @@ namespace :gitlab do
desc "GitLab | Import bare repositories from repositories -> storages into GitLab project instance"
task repos: :environment do
if Project.current_application_settings.hashed_storage_enabled
puts 'Cannot import repositories when Hashed Storage is enabled'.color(:red)
exit 1
Gitlab.config.repositories.storages.each_value do |repository_storage|
git_base_path = repository_storage['path']
repos_to_import = Dir.glob(git_base_path + '/**/*.git')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment