From b39491fa110a7523f8925fc404b764b024463738 Mon Sep 17 00:00:00 2001 From: Lumynous Date: Tue, 4 Mar 2025 13:39:03 +0800 Subject: [PATCH] Remove similar trailer keys from commit hook The duplicated "Close" and "Closes" keys will possibly cause inconsistency between commit messages. The one being kept is "Closes" because the implied subject is "this patch", so it should complete the following sentence: This patch [closes]... just like sentences in the body of a message. "Bug" is also removed due to its similarity to "Closes a bug". Change-Id: Idea7c0310249c603e550a7a4e27df490efe13d4c --- scripts/commit-msg.hook | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/commit-msg.hook b/scripts/commit-msg.hook index e2a92412f..0ba27bf28 100755 --- a/scripts/commit-msg.hook +++ b/scripts/commit-msg.hook @@ -140,8 +140,7 @@ build_commit_trailer_regex() { # Predefined trailer keys. trailers=( - 'CC' 'Change-Id' - 'Bug' 'Close' 'Closes' + 'CC' 'Change-Id' 'Closes' 'Acked-by' 'Co-authored-by' 'Reported-by' 'Reviewed-by' 'Signed-off-by' 'Suggested-by' 'Tested-by' )