BigW Consortium Gitlab
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.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
file_collection | Loading commit data... | |
formatters | Loading commit data... | |
diff_refs.rb | Loading commit data... | |
file.rb | Loading commit data... | |
highlight.rb | Loading commit data... | |
image_point.rb | Loading commit data... | |
inline_diff.rb | Loading commit data... | |
inline_diff_markdown_marker.rb | Loading commit data... | |
inline_diff_marker.rb | Loading commit data... | |
line.rb | Loading commit data... | |
line_mapper.rb | Loading commit data... | |
parallel_diff.rb | Loading commit data... | |
parser.rb | Loading commit data... | |
position.rb | Loading commit data... | |
position_tracer.rb | Loading commit data... |