diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-12-27 12:10:20 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-12-27 12:10:20 +0000 |
commit | 07f0486cf8d5952afb76d153888e600f1f26ad87 (patch) | |
tree | 373aaa0180a91a1ba26378726ca72fe6aa75bf14 /lib | |
parent | 2a830f87cfae686aa88f995b179f155d1e3537b5 (diff) | |
parent | 1e5e56c698740e049a3fcf7b578ac006d5deef42 (diff) | |
download | gitlab-ce-07f0486cf8d5952afb76d153888e600f1f26ad87.tar.gz |
Merge branch '25931-gitlab-merge-request-view-crash-when-commiting-a-js-sourcemap-file' into 'master'
Resolve "Gitlab merge request view crash when commiting a js sourcemap file"
Closes #25931
See merge request !8310
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/diff/file_collection/merge_request_diff.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/diff/file_collection/merge_request_diff.rb b/lib/gitlab/diff/file_collection/merge_request_diff.rb index 56530448f36..329d12f13d1 100644 --- a/lib/gitlab/diff/file_collection/merge_request_diff.rb +++ b/lib/gitlab/diff/file_collection/merge_request_diff.rb @@ -61,7 +61,10 @@ module Gitlab end def cacheable?(diff_file) - @merge_request_diff.present? && diff_file.blob && diff_file.blob.text? + @merge_request_diff.present? && + diff_file.blob && + diff_file.blob.text? && + @project.repository.diffable?(diff_file.blob) end def cache_key |