From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Thomas Monjalon <thomas@monjalon.net>
Subject: [RFC 3/4] devtools: remove blank line requirement between trailers
Date: Thu, 2 Apr 2026 09:16:08 -0700 [thread overview]
Message-ID: <20260402161719.82570-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20260402161719.82570-1-stephen@networkplumber.org>
Remove the SEQ[4]="^$" entry that required a blank line between
relation tags (Fixes, Cc) and attribution tags (Signed-off-by).
In the Linux kernel, all trailers form a single contiguous block
with no internal blank lines. This is also how git-interpret-trailers(1)
defines a trailer block: a group of consecutive trailer lines preceded
by a blank line. A blank line within the block causes git to only
parse the lower portion, losing the upper trailers.
Use %(trailers:key-only) to feed tag names into the ordering check
instead of the previous grep+cut pipeline on the body. This is
consistent with the %(trailers:unfold) change for tag extraction.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
devtools/check-git-log.sh | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index 3775b1587f..94cf68b926 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -223,28 +223,29 @@ done)
&& failure=true;}
# check tag sequence
+# All trailers form a single contiguous block with no blank lines,
+# matching kernel/netdev convention and git-interpret-trailers(1).
bad=$(for commit in $commits; do
- body=$(git log --format='%b' -1 $commit)
- echo "$body" |
- grep -o -e "$reltag\|^[[:blank:]]*$\|$bytag" |
- # retrieve tags only
- cut -f1 -d":" |
+ git log --format='%(trailers:key-only)' -1 $commit |
+ grep -v '^$' |
# it is okay to have several tags of the same type
# but for processing we need to squash them
uniq |
# make sure the tags are in the proper order as presented in SEQ
awk -v subject="$(git log --format='\t%s' -1 $commit)" 'BEGIN{
- SEQ[0] = "Coverity issue";
- SEQ[1] = "Bugzilla ID";
- SEQ[2] = "Fixes";
- SEQ[3] = "Cc";
- SEQ[4] = "^$";
- SEQ[5] = "Reported-by";
- SEQ[6] = "Suggested-by";
- SEQ[7] = "Signed-off-by";
- SEQ[8] = "Acked-by";
- SEQ[9] = "Reviewed-by";
- SEQ[10] = "Tested-by";
+ SEQ[0] = "Fixes";
+ SEQ[1] = "Closes";
+ SEQ[2] = "Link";
+ SEQ[3] = "Coverity issue";
+ SEQ[4] = "Bugzilla ID";
+ SEQ[5] = "Cc";
+ SEQ[6] = "Reported-by";
+ SEQ[7] = "Suggested-by";
+ SEQ[8] = "Co-developed-by";
+ SEQ[9] = "Signed-off-by";
+ SEQ[10] = "Acked-by";
+ SEQ[11] = "Reviewed-by";
+ SEQ[12] = "Tested-by";
latest = 0;
chronological = 0;
}
--
2.53.0
next prev parent reply other threads:[~2026-04-02 16:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 16:16 [PATCH 0/4] devtools: align trailer checks with kernel convention Stephen Hemminger
2026-04-02 16:16 ` Stephen Hemminger [this message]
2026-04-02 16:16 ` [RFC 4/4] devtools: demote tag ordering to warning Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260402161719.82570-4-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox