debian-mirror-gitlab/lib/gitlab/git/repository_cleaner.rb

29 lines
627 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
module Gitlab
module Git
class RepositoryCleaner
include Gitlab::Git::WrapsGitalyErrors
attr_reader :repository
# 'repository' is a Gitlab::Git::Repository
def initialize(repository)
@repository = repository
end
2019-07-31 22:56:46 +05:30
def apply_bfg_object_map_stream(io, &blk)
2019-02-15 15:39:39 +05:30
wrapped_gitaly_errors do
2019-07-31 22:56:46 +05:30
gitaly_cleanup_client.apply_bfg_object_map_stream(io, &blk)
2019-02-15 15:39:39 +05:30
end
end
private
def gitaly_cleanup_client
@gitaly_cleanup_client ||= Gitlab::GitalyClient::CleanupService.new(repository)
end
end
end
end