Inline diff shows additions and removals interleaved with each other
Summary
Inline diffs in MRs are currently less readable, since in contiguous blocks which have changes, the additions and removals are all interleaved.
Steps to reproduce
- Ensure the
unified_diff_lines
feature flag is enabled - Create an MR with a diff which changes multiple consecutive lines in a file
- View the MR in inline mode
- See interleaved additions/removals
Example Project
!41995 (diffs) (see in particular the ee/spec/frontend/security_configuration/sast/components/configuration_form_spec.js
file diff)
What is the current bug behavior?
Additions/removals are interleaved.
What is the expected correct behavior?
One contiguous removal block, followed by one contiguous addition block (i.e., how git
natively renders diffs)
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com - at least, it did, until the unified_diff_lines
feature flag was disabled.
Edited by Mark Florian