diff options
Diffstat (limited to 'lib/gitlab/gitaly_client')
-rw-r--r-- | lib/gitlab/gitaly_client/blobs_stitcher.rb | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/gitlab/gitaly_client/blobs_stitcher.rb b/lib/gitlab/gitaly_client/blobs_stitcher.rb index 01bab854082..f860d8ce517 100644 --- a/lib/gitlab/gitaly_client/blobs_stitcher.rb +++ b/lib/gitlab/gitaly_client/blobs_stitcher.rb @@ -13,17 +13,15 @@ module Gitlab current_blob_data = nil @rpc_response.each do |msg| - begin - if msg.oid.blank? && msg.data.blank? - next - elsif msg.oid.present? - yield new_blob(current_blob_data) if current_blob_data - - current_blob_data = msg.to_h.slice(:oid, :path, :size, :revision, :mode) - current_blob_data[:data] = msg.data.dup - else - current_blob_data[:data] << msg.data - end + if msg.oid.blank? && msg.data.blank? + next + elsif msg.oid.present? + yield new_blob(current_blob_data) if current_blob_data + + current_blob_data = msg.to_h.slice(:oid, :path, :size, :revision, :mode) + current_blob_data[:data] = msg.data.dup + else + current_blob_data[:data] << msg.data end end |