BigW Consortium Gitlab
Old merge requests can have diffs without corresponding blobs. (This also may be possible for commit diffs in corrupt repositories.) We can't use the `&.` operator on the blobs, because the blob objects are never nil, but `BatchLoader` instances that delegate to `Blob`. We can't use `Object#try`, because `Blob` doesn't inherit from `Object`. `BatchLoader` provides a `__sync` method that returns the delegated object, but using `itself` also works because it's forwarded, and will work for non-`BatchLoader` instances too. So the simplest solution is to just use that with the `&.` operator.
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... |