提交 5cd20de7 编写于 作者: R Rémy Coutable

Eager-load image blob data in diffs

Since gitlab_git 8.0, blob data are lazy-loaded so we have to call
blob.load_all_data!(repo) to eager-load them.

Fixes #13458.
上级 3de6edd6
- diff = diff_file.diff
- file.load_all_data!(@project.repository)
- if diff.renamed_file || diff.new_file || diff.deleted_file
.image
%span.wrap
......@@ -6,6 +7,7 @@
%img{src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
%p.image-info= "#{number_to_human_size file.size}"
- else
- old_file.load_all_data!(@project.repository)
.image
%div.two-up.view
%span.wrap
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册