From c2cf8824700857ed2ef8558c77286d8c253799b6 Mon Sep 17 00:00:00 2001 From: Joe Woodward Date: Wed, 16 Aug 2023 13:02:17 +0100 Subject: [PATCH] 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 https://gitlab.com/gitlab-org/gitlab/-/issues/23625 Changelog: fixed --- .../development/merge_commit_diff_modes.yml | 2 +- doc/user/project/file_lock.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config/feature_flags/development/merge_commit_diff_modes.yml b/config/feature_flags/development/merge_commit_diff_modes.yml index 2da966e1cbbaf6..d550ae9aba0d48 100644 --- a/config/feature_flags/development/merge_commit_diff_modes.yml +++ b/config/feature_flags/development/merge_commit_diff_modes.yml @@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/415579 milestone: '16.1' type: development group: group::source code -default_enabled: false +default_enabled: true diff --git a/doc/user/project/file_lock.md b/doc/user/project/file_lock.md index 2a23bf57786517..a0058c8b8b0081 100644 --- a/doc/user/project/file_lock.md +++ b/doc/user/project/file_lock.md @@ -40,6 +40,16 @@ users are prevented from modifying locked files by pushing, merging, or any other means, and are shown an error like: `The path '.gitignore' is locked by Administrator`. +NOTE: +There is a bug which blocks changes which include a merged file locked by +another user. In 16.1 we introduced `merge_commit_diff_modes` feature flag, +disabled by default. When `merge_commit_diff_modes` is enabled merge commits +with no additional changes are not evaluated. Merge commits with additional +changes only evaluate the changes that were added by the committer. +In 16.3 `merge_commit_diff_modes` is enabled by default for self-managed +instances. +For more information see [Issue 23625](https://gitlab.com/gitlab-org/gitlab/-/issues/23625). + ## Exclusive file locks This process allows you to lock single files or file extensions and it is -- GitLab