Fix old MR diffs
What does this MR do?
Fix old MR diffs, when we can't figure out the correct diff refs. This is in two commits. The first doesn't preview them, and the second makes them look like this (note that the added diff can still be highlighted!):
Are there points in the code the reviewer needs to double check?
- Should
new_file? || deleted_file? || content_changed?
be moved to a method? What should we call it? - I didn't actually do https://gitlab.com/gitlab-org/gitlab-ce/issues/36516#note_38068227, but just redefined
highlighted_diff_lines
instead. This seems more natural to me, but maybe I'm missing something.
Why was this MR needed?
I broke fallback_diff_refs
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/36516.