Use grpc 1.4.5
This commit is contained in:
parent
c3e0f31dfb
commit
40752ce7e9
|
@ -356,7 +356,7 @@ GEM
|
|||
activesupport
|
||||
grape (>= 0.16.0)
|
||||
rake
|
||||
grpc (1.4.0)
|
||||
grpc (1.4.5)
|
||||
google-protobuf (~> 3.1)
|
||||
googleauth (~> 0.5.1)
|
||||
haml (4.0.7)
|
||||
|
|
|
@ -13,10 +13,17 @@ module Gitlab
|
|||
)
|
||||
response = GitalyClient.call(@gitaly_repo.storage_name, :blob_service, :get_blob, request)
|
||||
|
||||
blob = response.first
|
||||
return unless blob.oid.present?
|
||||
data = ''
|
||||
blob = nil
|
||||
response.each do |msg|
|
||||
if blob.nil?
|
||||
blob = msg
|
||||
end
|
||||
|
||||
data = response.reduce(blob.data.dup) { |memo, msg| memo << msg.data.dup }
|
||||
data << msg.data
|
||||
end
|
||||
|
||||
return nil if blob.oid.blank?
|
||||
|
||||
Gitlab::Git::Blob.new(
|
||||
id: blob.oid,
|
||||
|
|
|
@ -60,15 +60,21 @@ module Gitlab
|
|||
)
|
||||
|
||||
response = GitalyClient.call(@repository.storage, :commit_service, :tree_entry, request)
|
||||
entry = response.first
|
||||
return unless entry.oid.present?
|
||||
|
||||
if entry.type == :BLOB
|
||||
rest_of_data = response.reduce("") { |memo, msg| memo << msg.data }
|
||||
entry.data += rest_of_data
|
||||
entry = nil
|
||||
data = ''
|
||||
response.each do |msg|
|
||||
if entry.nil?
|
||||
entry = msg
|
||||
|
||||
break unless entry.type == :BLOB
|
||||
end
|
||||
|
||||
data << msg.data
|
||||
end
|
||||
entry.data = data
|
||||
|
||||
entry
|
||||
entry unless entry.oid.blank?
|
||||
end
|
||||
|
||||
def tree_entries(repository, revision, path)
|
||||
|
|
Loading…
Reference in New Issue