summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/repo_restorer.rb
diff options
context:
space:
mode:
authorLuke Duncalfe <lduncalfe@eml.cc>2019-07-16 15:31:44 +1200
committerLuke Duncalfe <lduncalfe@eml.cc>2019-09-06 14:18:45 +1200
commit55ad5423eea6281657e1f7c6630774934f1f26b9 (patch)
treedf72e6ee436c1504e4bbb55b3e1474b84c81087f /lib/gitlab/import_export/repo_restorer.rb
parent8e49c2338a4cc9664e5f8fe454077a7a4021240c (diff)
downloadgitlab-ce-55ad5423eea6281657e1f7c6630774934f1f26b9.tar.gz
CE-specific changes to allow design repo exports11090-project-export-design-repository-ce
https://gitlab.com/gitlab-org/gitlab-ee/issues/11090
Diffstat (limited to 'lib/gitlab/import_export/repo_restorer.rb')
-rw-r--r--lib/gitlab/import_export/repo_restorer.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/gitlab/import_export/repo_restorer.rb b/lib/gitlab/import_export/repo_restorer.rb
index 91167a9c4fb..3123687453f 100644
--- a/lib/gitlab/import_export/repo_restorer.rb
+++ b/lib/gitlab/import_export/repo_restorer.rb
@@ -6,19 +6,23 @@ module Gitlab
include Gitlab::ImportExport::CommandLineUtil
def initialize(project:, shared:, path_to_bundle:)
- @project = project
+ @repository = project.repository
@path_to_bundle = path_to_bundle
@shared = shared
end
def restore
- return true unless File.exist?(@path_to_bundle)
+ return true unless File.exist?(path_to_bundle)
- @project.repository.create_from_bundle(@path_to_bundle)
+ repository.create_from_bundle(path_to_bundle)
rescue => e
- @shared.error(e)
+ shared.error(e)
false
end
+
+ private
+
+ attr_accessor :repository, :path_to_bundle, :shared
end
end
end