"Click to expand" on a commit in a MR shows unrelated changes
Summary
When a merge request has multiple commits, and multiple commits edits the same file, and some commit has changes large enough to trigger the collapsing of showing the diff, if I open the commit view, click "Click to expand", the displayed diff shows content from the other commits.
In effect, it makes commit-by-commit review unusable, since often diffs are collapsed, and for those commits, no review can be done.
Steps to reproduce
- Create MR with multiple commits changing the same file, where the first commit changes the file enough to trigger the collapsing.
- Click on "Commits" in the MR
- Click on the commit with the large enough change
- Click "Click to expand" to show the changes
- Observe that the displayed changes are not only the one from the commit
Example Project
In the following MR, the first commit triggers the issue: https://gitlab.gnome.org/GNOME/mutter/merge_requests/208/diffs?commit_id=2d0782516a73649f2c81f8670f556bf42cd9ceb4
Go to the commit list, click the first commit, then click expand. The content should only be changing symbol names etc.
What is the current bug behavior?
The dispalyed content doesn't correspond to the changes in the commit.
What is the expected correct behavior?
The displayed content should correspond to the changes in the commit.
Relevant logs and/or screenshots
A screenshot of the expanded view of a commit:
A screenshot of the same commit showing the same changes but in gitk: