summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorHiroyuki Sato <sathiroyuki@gmail.com>2019-09-10 16:33:03 +0900
committerHiroyuki Sato <sathiroyuki@gmail.com>2019-09-10 17:02:30 +0900
commitce46b40252f5667c6dc5817acee62f100b693c53 (patch)
tree6671f5e1b730a9a64abe967b64bc12a1105b7592 /app
parente47cbf374fe1b647b37e4ed240654558b813ffdd (diff)
downloadgitlab-ce-ce46b40252f5667c6dc5817acee62f100b693c53.tar.gz
Fix encoding error in MR diffs
Diffstat (limited to 'app')
-rw-r--r--app/models/merge_request_diff_file.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/merge_request_diff_file.rb b/app/models/merge_request_diff_file.rb
index 01ee82ae398..a532c1e6356 100644
--- a/app/models/merge_request_diff_file.rb
+++ b/app/models/merge_request_diff_file.rb
@@ -17,7 +17,7 @@ class MergeRequestDiffFile < ApplicationRecord
if merge_request_diff&.stored_externally?
merge_request_diff.opening_external_diff do |file|
file.seek(external_diff_offset)
- file.read(external_diff_size)
+ force_encode_utf8(file.read(external_diff_size))
end
else
super