summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-09-29 17:20:56 -0700
committerStan Hu <stanhu@gmail.com>2017-10-02 08:51:37 -0700
commitbac29160302549c3c651991bf839b304a9e1c8b4 (patch)
tree24355af64eadbf70abcb58991b4225f8c2860be4 /lib
parentb40192a9464503bf4b141f8cf6133d7ba0f893fe (diff)
downloadgitlab-ce-bac29160302549c3c651991bf839b304a9e1c8b4.tar.gz
Fix gitlab-rake gitlab:import:repos task
Because of a change in GitLab 9.5.4 to prevent users from assuming control of a repository already on disk, the import task broke. Imports would fail with the message, "There is already a repository with that name on disk". This change skips the validation when the import is done from the command-line. Closes #37682
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/bare_repository_importer.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/bare_repository_importer.rb b/lib/gitlab/bare_repository_importer.rb
index 9323bfc7fb2..1d98d187805 100644
--- a/lib/gitlab/bare_repository_importer.rb
+++ b/lib/gitlab/bare_repository_importer.rb
@@ -56,7 +56,8 @@ module Gitlab
name: project_path,
path: project_path,
repository_storage: storage_name,
- namespace_id: group&.id
+ namespace_id: group&.id,
+ skip_disk_validation: true
}
project = Projects::CreateService.new(user, project_params).execute