From: openocd-gerrit <ope...@us...> - 2024-11-16 14:26:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 8a3723022689dd078c3e61268615616d5566fc94 (commit) from 6d60ac5c08e6343008f40ee3d8daa5e8e00eb148 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8a3723022689dd078c3e61268615616d5566fc94 Author: Antonio Borneo <bor...@gm...> Date: Mon Apr 10 12:02:55 2023 +0200 checkpatch: exclude gerrit's Change-Id line from commit description Checkpatch rejects patches that have empty commit description and logs them with: WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one But if the patch has a gerrit's Change-Id line placed before the line Signed-off-by, then checkpatch considers the Change-Id line as a valid commit description text. Use the Change-Id tag as a marker of the end of the commit message, thus not counting its line as part of the commit description. This patch is not relevant for the Linux kernel development process as gerrit is not involved and the Change-Id tag is rejected. But other projects, like OpenOCD, base the development on gerrit and reuse kernel's checkpatch with flag '--ignore GERRIT_CHANGE_ID'. This patch has been refused [1] in Linux upstream because it has not been considered relevant for that project. Let's take it as another add-on in OpenOCD checkpatch. Change-Id: I3b55b8fffa07ce67177c108e7c9554ca46674246 Signed-off-by: Antonio Borneo <bor...@gm...> Link: [1] https://lore.kernel.org/lkml/202...@gm.../ Reviewed-on: https://review.openocd.org/c/openocd/+/8539 Tested-by: jenkins diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl index 01bd547ff..1011b3305 100755 --- a/tools/scripts/checkpatch.pl +++ b/tools/scripts/checkpatch.pl @@ -3251,6 +3251,9 @@ sub process { # Check for Gerrit Change-Ids not in any patch context if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) { + # OpenOCD specific: Begin: exclude gerrit's Change-Id line from commit description + $in_commit_log = 0; + # OpenOCD specific: End if (ERROR("GERRIT_CHANGE_ID", "Remove Gerrit Change-Id's before submitting upstream\n" . $herecurr) && $fix) { ----------------------------------------------------------------------- Summary of changes: tools/scripts/checkpatch.pl | 3 +++ 1 file changed, 3 insertions(+) hooks/post-receive -- Main OpenOCD repository |