Skip to content

Fix old MR diffs

Sean McGivern requested to merge fix-old-mr-diffs into master

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!):

image

Are there points in the code the reviewer needs to double check?

  1. Should new_file? || deleted_file? || content_changed? be moved to a method? What should we call it?
  2. 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?

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/36516.

Merge request reports

Loading