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.
This commit is contained in:
parent
3de6edd604
commit
5cd20de749
1 changed files with 2 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
- 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
|
||||
|
|
Loading…
Reference in a new issue