Commit 17d7d3de authored by Jacob Vosmaer's avatar Jacob Vosmaer

Add git_blob_load_all_data feature flag

parent 06b94492
...@@ -175,8 +175,17 @@ module Gitlab ...@@ -175,8 +175,17 @@ module Gitlab
return if @data == '' # don't mess with submodule blobs return if @data == '' # don't mess with submodule blobs
return @data if @loaded_all_data return @data if @loaded_all_data
Gitlab::GitalyClient.migrate(:git_blob_load_all_data) do |is_enabled|
@data = begin
if is_enabled
Gitlab::GitalyClient::Blob.new(repository).get_blob(oid: id, limit: -1).data
else
repository.lookup(id).content
end
end
end
@loaded_all_data = true @loaded_all_data = true
@data = repository.lookup(id).content
@loaded_size = @data.bytesize @loaded_size = @data.bytesize
@binary = nil @binary = nil
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment