Skip to content

Only check valid changes during diff checks

What does this MR do and why?

Only check valid changes during diff checks

When merge_commit_diff_modes is enabled, our diff logic will only return changes that are not in the base branch. This means when a user merges the default branch into their branch, these changes will not be evaluated when pushed to GitLab. Only merge conflicts or manual additions will count as changes.

Fixes #23625

Changelog: fixed

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
image image

How to set up and validate locally

See Git LFS lock in GitLab prevents pushes of new f... (#23625)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports