[go: up one dir, main page]

Skip to content

Add option to hide changes introduced to MR via merges from source

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

Release notes

Add an option to hide changes introduced by merges from target to source.

Problem to solve

Suppose the following workflow:

  • Commit changes (A) to feature1
  • Create MR feature1->master
  • Review all changes
  • Commit changes (M) on master (e.g. by another MR)
  • Merge master -> feature1 (e.g. motivated by a merge conflict)
  • Add more commits (B) to feature1

As a reviewer, I want to see only changes with the following properties:

  • not already available in target/master
  • not reviewed yet / introduced to feature1 after my previous review of A.

Currently, there are only two options available to the reviewer:

  • Diff master->latest. This will require re-review of changes in A.
  • Diff version1/A->latest. This will show all changes introduced to master, which have already been reviewed by someone else during the corresponding MR. Depending on activity on master, this will blow up the review with hundreds of unrelated changes.

Proposal

Add an option to hide changes introduced by merges from the target branch.

Option 1

Show a "combined diff" for merge commits. Such a diff can be obtained on the command line by issuing git show $MERGECOMMIT.

It may make sense to split off the merge into a separate review-version for this.

This is the cleaner option, but would require the diff-view to be able to display combined diffs.

Option 2

Alternatively, it would be possible to filter on the file level and at least exclude all files that would not be changed by the MR. This would also show other changes in the same file, which will still be a lot of noise. But at least, completely unrelated changes to other files would be hidden.

Intended users

Feature Usage Metrics

Further notes

Opening this ticket was suggested in https://support.gitlab.com/hc/en-us/requests/291926

Edited by 🤖 GitLab Bot 🤖