DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com,
	Bruce Richardson <bruce.richardson@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>
Subject: [PATCH] buildtools/check-git-log: print expected driver prefix
Date: Fri, 24 Jan 2025 17:24:34 +0000	[thread overview]
Message-ID: <20250124172434.1422621-1-bruce.richardson@intel.com> (raw)

When outputting an error for an invalid log prefix, don't just tell the
user that the prefix is wrong - also tell them what the expected prefix
should be.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/check-git-log.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index 2ee7f2db64..9582f03dea 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -81,12 +81,13 @@ bad=$(for commit in $commits ; do
 	drv=$(echo "$files" | grep '^drivers/' | cut -d "/" -f 2,3 | sort -u)
 	drvgrp=$(echo "$drv" | cut -d "/" -f 1 | uniq)
 	if [ $(echo "$drvgrp" | wc -l) -gt 1 ] ; then
-		echo "$headline" | grep -v '^drivers:'
+		prefix='drivers:'
 	elif [ $(echo "$drv" | wc -l) -gt 1 ] ; then
-		echo "$headline" | grep -v "^drivers/$drvgrp"
+		prefix="drivers/$drvgrp:"
 	else
-		echo "$headline" | grep -v "^$drv"
+		prefix="$drv"
 	fi
+	echo "$headline (expected prefix \"$prefix\")" | grep -v "^$prefix"
 done | sed 's,^,\t,')
 [ -z "$bad" ] || { printf "Wrong headline prefix:\n$bad\n" && failure=true;}
 
-- 
2.43.0


                 reply	other threads:[~2025-01-24 17:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250124172434.1422621-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).