Skip to content
Snippets Groups Projects
Commit 17d7d3de authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Add git_blob_load_all_data feature flag

parent 06b94492
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -175,8 +175,17 @@ module Gitlab
return if @data == '' # don't mess with submodule blobs
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
@data = repository.lookup(id).content
@loaded_size = @data.bytesize
@binary = nil
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment