Skip to content

Adjust insufficient diff hunks being persisted on NoteDiffFile

This currently causes 500's errors when loading the MR page (Discussion) in a few scenarios.

We were not considering detailed diff headers such as --- a/doc/update/mysql_to_postgresql.md\n+++ b/doc/update/mysql_to_postgresql.md before cropping the diff. In order to address it, we're now using Gitlab::Diff::Parser to clean the diffs and build Gitlab::Diff::Line's we can reliably filter on, before persisting.

See https://sentry.gitlap.com/gitlab/staginggitlabcom/issues/211376/

Edited by Oswaldo Ferreira

Merge request reports