[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180602012646.2a0801e8@canb.auug.org.au>
Date: Sat, 2 Jun 2018 01:26:46 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: dvhart@...radead.org
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Linux-Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Haruka Kawajiri <yukx00@...il.com>
Subject: Re: linux-next: Signed-off-by missing for commit in the drivers-x86
tree
Hi,
On Fri, 01 Jun 2018 07:38:42 -0700 dvhart@...radead.org wrote:
>
> Stephen, are the tests you use available publicly?
I use the script below when I am fetching trees. You don't want the
"gitk" invocation if you are doing this automatically, of course. The
script just takes a commit range.
--
Cheers,
Stephen Rothwell
-------------------------------------------------------------
#!/bin/bash
if [ "$#" -lt 1 ]; then
printf "Usage: %s <commit range>\n", "$0" 1>&2
exit 1
fi
commits=$(git rev-list --no-merges "$@")
if [ -z "$commits" ]; then
printf "No commits\n"
exit 0
fi
for c in $commits; do
ae=$(git log -1 --format='%ae' "$c")
aE=$(git log -1 --format='%aE' "$c")
an=$(git log -1 --format='%an' "$c")
aN=$(git log -1 --format='%aN' "$c")
ce=$(git log -1 --format='%ce' "$c")
cE=$(git log -1 --format='%cE' "$c")
cn=$(git log -1 --format='%cn' "$c")
cN=$(git log -1 --format='%cN' "$c")
sob=$(git log -1 --format='%b' "$c" | grep -i '^[[:space:]]*Signed-off-by:')
am=false
cm=false
grep -i -q "<$ae>" <<<"$sob" ||
grep -i -q "<$aE>" <<<"$sob" ||
grep -i -q ":[[:space:]]*$an[[:space:]]*<" <<<"$sob" ||
grep -i -q ":[[:space:]]*$aN[[:space:]]*<" <<<"$sob" ||
am=true
grep -i -q "<$ce>" <<<"$sob" ||
grep -i -q "<$cE>" <<<"$sob" ||
grep -i -q ":[[:space:]]*$cn[[:space:]]*<" <<<"$sob" ||
grep -i -q ":[[:space:]]*$cN[[:space:]]*<" <<<"$sob" ||
cm=true
if "$am" || "$cm"; then
printf "Commit %s\n" "$c"
"$am" && printf "\tauthor SOB missing\n"
"$cm" && printf "\tcommitter SOB missing\n"
printf "%s %s\n%s\n" "$ae" "$ce" "$sob"
fi
done
exec gitk "$@"
-------------------------------------------------------------
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists