diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2017-08-11 12:03:35 +0200 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2017-08-22 06:33:20 +0200 |
commit | 78823675b24e82e73a523ad98f1dec78bec6976c (patch) | |
tree | 280c30b613aed0e98d40fec8107f4800a5a22d11 /lib | |
parent | de89dcc2137039bbdb1811e03715e8e62adc8c66 (diff) | |
download | gitlab-ce-78823675b24e82e73a523ad98f1dec78bec6976c.tar.gz |
Prevent using gitlab import task when hashed storage is enabled
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/gitlab/import.rake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/import.rake b/lib/tasks/gitlab/import.rake index 48bd9139ce8..6e10ba374bf 100644 --- a/lib/tasks/gitlab/import.rake +++ b/lib/tasks/gitlab/import.rake @@ -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 + end + Gitlab.config.repositories.storages.each_value do |repository_storage| git_base_path = repository_storage['path'] repos_to_import = Dir.glob(git_base_path + '/**/*.git') |