Merge request diff sets
This came up when talking with a user at OSCON. I think it's worthy of a discussion.
Problem
In larger merge requests it can become difficult to keep track of requested changes and potential new changes sneaking in between commits/pushes. For example, suppose I make a bunch of comments on a merge request asking the developer to change things. They come along and fix all of these things and then ask me to review the merge request again. It's not easy to see if they 'snuck' in other changes, whether maliciously or just because they saw something else that needed fixed.
Solution?
The user described a workflow: Once the reviewer makes comments during the first round they can 'mark' the set somehow. This indicates that any changes now should be shown as a diff between the reviewed code and the new changes. This enables the reviewer to easily step between review sessions and have no doubt as to what code changed.
I don't think we should change the default diff view in merge requests but maybe add this feature in another way that is useful and has a good UX?
- This is almost like looking at a diff between individual commits, which can be done today. However, this feature should also account for scenarios where a user rebases/squashes commits between pushes. In this case the diff should be between the original commit (no longer in this MR) and the new commit. It also allows easy view of changes in the case that multiple/many commits are pushed between reviews.