* [PATCH] buildtools/check-git-log: print expected driver prefix
@ 2025-01-24 17:24 Bruce Richardson
0 siblings, 0 replies; only message in thread
From: Bruce Richardson @ 2025-01-24 17:24 UTC (permalink / raw)
To: dev; +Cc: david.marchand, Bruce Richardson, Thomas Monjalon
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-24 17:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-24 17:24 [PATCH] buildtools/check-git-log: print expected driver prefix Bruce Richardson
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).