gitlab-org--gitlab-foss/spec/lib/gitlab/diff
Sean McGivern cdf3ae04f8 Fix 500 error when diff context line has broken encoding
Rugged sometimes chops a context line in between bytes, resulting in the context
line having an invalid encoding: https://github.com/libgit2/rugged/issues/716

When that happens, we will try to detect the encoding for the diff, and
sometimes we'll get it wrong. If that difference in encoding results in a
difference in string lengths between the diff and the underlying blobs, we'd
fail to highlight any inline diffs, and return a 500 status to the user.

As we're using the underlying blobs, the encoding is 'correct' anyway, so if the
string range is invalid, we can just discard the inline diff highlighting. We
still report to Sentry to ensure that we can investigate further in future.
2018-02-22 12:26:23 +00:00
..
file_collection Fix error 500 when viewing commit and merge request diffs 2018-01-07 04:49:07 -08:00
formatters Commenting on image diffs 2017-10-07 04:25:17 +00:00
diff_refs_spec.rb Add specs 2017-09-25 16:56:14 +02:00
file_spec.rb Fix error when viewing diffs without blobs 2018-01-04 14:33:12 +00:00
highlight_spec.rb Fix 500 error when diff context line has broken encoding 2018-02-22 12:26:23 +00:00
inline_diff_markdown_marker_spec.rb
inline_diff_marker_spec.rb
inline_diff_spec.rb fix #39233 - 500 in merge request 2017-12-07 20:19:37 +01:00
line_mapper_spec.rb
parallel_diff_spec.rb
parser_spec.rb Fix diff parser so it tolerates to diff special markers in the content 2017-10-15 17:00:36 +03:00
position_spec.rb Fix 500 error for old (somewhat) MRs 2017-10-30 12:30:31 +00:00
position_tracer_spec.rb Ensure MRs always use branch refs for comparison 2017-11-28 17:01:38 +00:00