From bf81c588fd7f34e475c0f317f7e49dc70e36366d Mon Sep 17 00:00:00 2001 From: James Lopez Date: Fri, 13 May 2016 19:51:07 +0200 Subject: [PATCH] fix issue with mapping members --- lib/gitlab/import_export/command_line_util.rb | 6 ------ lib/gitlab/import_export/members_mapper.rb | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/gitlab/import_export/command_line_util.rb b/lib/gitlab/import_export/command_line_util.rb index f53f8fba96..c99b0d83b4 100644 --- a/lib/gitlab/import_export/command_line_util.rb +++ b/lib/gitlab/import_export/command_line_util.rb @@ -19,12 +19,6 @@ module Gitlab private - def git_unbundle(git_bin_path: Gitlab.config.git.bin_path, repo_path:, bundle_path:) - cmd = %W(#{git_bin_path} clone --bare #{bundle_path} #{repo_path}) - _output, status = Gitlab::Popen.popen(cmd) - status.zero? - end - def tar_with_options(archive:, dir:, options:) execute(%W(tar -#{options} #{archive} -C #{dir} .)) end diff --git a/lib/gitlab/import_export/members_mapper.rb b/lib/gitlab/import_export/members_mapper.rb index a5fdac6d93..4401fab3d2 100644 --- a/lib/gitlab/import_export/members_mapper.rb +++ b/lib/gitlab/import_export/members_mapper.rb @@ -10,6 +10,10 @@ module Gitlab @project = project @note_member_list = [] + # This needs to run first, as second call would be from generate_map + # which means project members already exist. + default_project_member + @project_member_map = Hash.new do |_, key| @note_member_list << key default_project_member