diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-12-27 12:10:20 +0000 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2016-12-27 16:52:38 +0000 |
commit | 0e7857fe68ee2e0919d314aefd47baeba41eee05 (patch) | |
tree | d446653a4b9c12dcbc3ecf1c29dac91fc284c8ec /lib | |
parent | a4a7517a132ca1cc6cea4d1d3423a313a02ebceb (diff) | |
download | gitlab-ce-0e7857fe68ee2e0919d314aefd47baeba41eee05.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 |