diff options
author | Stan Hu <stanhu@gmail.com> | 2017-12-08 14:48:52 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-12-08 14:56:43 -0800 |
commit | 78f7c3c8a2ac9f72b54e8e76005ef8810d1a068a (patch) | |
tree | 7a732ba640c04f19622798c2f087b86b0f779e2d /lib/gitlab/bare_repository_import | |
parent | 806a68a81f1baeed07c146b1b5d9eb77796c46ba (diff) | |
download | gitlab-ce-78f7c3c8a2ac9f72b54e8e76005ef8810d1a068a.tar.gz |
Fix gitlab:import:repos Rake task moving repositories into the wrong location
If the source import directory were different from the destination directory,
GitLab would first create a blank repository and then erroneously move the
original one into a subdirectory. Adding an import type prevents this the project
from being initialized in the first place. It was accidentally removed in
1f917cbd49.
Closes #40765
Diffstat (limited to 'lib/gitlab/bare_repository_import')
-rw-r--r-- | lib/gitlab/bare_repository_import/importer.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/bare_repository_import/importer.rb b/lib/gitlab/bare_repository_import/importer.rb index 196de667805..298409d8b5a 100644 --- a/lib/gitlab/bare_repository_import/importer.rb +++ b/lib/gitlab/bare_repository_import/importer.rb @@ -55,6 +55,7 @@ module Gitlab name: project_name, path: project_name, skip_disk_validation: true, + import_type: 'gitlab_project', namespace_id: group&.id).execute if project.persisted? && mv_repo(project) |