Skip to content

Add checkbox to hide files changed on main branch when comparing revisions of a merge request

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Release notes

Problem to solve

Unable to review files when they're mixed up with merge commits that are irrelevant to the is being reviewed, when comparing to previous versions of a merge request.

After completing a round of changes on a merge request, pull requests are often brought up to date with the main branch. By merging in the main branch or by rebasing the branch on top of it. Doing this adds commits to the reviewed branch that are from the main branch. When it is then reviewed a second time, the reviewer will likely only wish to see files that have been changed since last time. However the compare to previous version feature includes all files that have changed since that version. Even if they're only changed due to the commits from the main branch, and haven't been changed directly by the person who is being reviewed.

This means the reviewer has to figure out whether files were changed on the merge request or are just from commits from the main branch. There might only be 10s of files changed, in a mixture of 1000s of files from the main branch for large projects. This makes reviewing changes since the first round of reviews exceedingly tedious.

Proposal

Propose to add a checkbox that can be checked to show only files that were changed on the pull request when using the compare with previous revision feature.

For example. Imagine the following commits

A: original commit from person being reviewed changed file 1 changed file 2 changed file 3

B: from master changed file 2 changed file 3 changed file 4

C: additional commit after previous code review changed file 2 changed file 5

Without checkbox checked (what it does currently) shows: file 2, 3, 4, 5

With checkbox checked (ignoring files only changed in master) shows: file 2, 3, 5

Should also consider adding this as a user preference, so don't have to check a box each time

Intended users

Delaney (Development Team Lead) Sasha (Software Developer) Priyanka (Platform Engineer) Rachel (Release Manager) Simone (Software Engineer in Test) Amy (Application Security Engineer) Isaac (Infrastructure Engineer) Alex (Security Operations Engineer)

Edited by 🤖 GitLab Bot 🤖