Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/object_pool.rb')
-rw-r--r--lib/gitlab/git/object_pool.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/gitlab/git/object_pool.rb b/lib/gitlab/git/object_pool.rb
index d0577d7a4ff..4b46fa5f82a 100644
--- a/lib/gitlab/git/object_pool.rb
+++ b/lib/gitlab/git/object_pool.rb
@@ -12,6 +12,17 @@ module Gitlab
attr_reader :storage, :relative_path, :source_repository, :gl_project_path
+ def self.init_from_gitaly(gitaly_object_pool, source_repository)
+ repository = gitaly_object_pool.repository
+
+ new(
+ repository.storage_name,
+ repository.relative_path,
+ source_repository,
+ repository.gl_project_path
+ )
+ end
+
def initialize(storage, relative_path, source_repository, gl_project_path)
@storage = storage
@relative_path = relative_path