-
- Downloads
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" to crop the diff. In order to address it, we're now using Gitlab::Diff::Parser, clean the diffs and builds Gitlab::Diff::Line objects we can iterate and filter on.
Showing
- changelogs/unreleased/osw-ignore-diff-header-when-persisting-diff-hunk.yml 5 additions, 0 deletions...ased/osw-ignore-diff-header-when-persisting-diff-hunk.yml
- lib/gitlab/diff/file.rb 6 additions, 3 deletionslib/gitlab/diff/file.rb
- lib/gitlab/diff/line.rb 4 additions, 0 deletionslib/gitlab/diff/line.rb
- spec/lib/gitlab/diff/file_spec.rb 63 additions, 50 deletionsspec/lib/gitlab/diff/file_spec.rb
Please register or sign in to comment