From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Mauro Carvalho Chehab <mchehab+samsung@kernel•org>
Cc: Greg KH <greg@kroah•com>,
Mauro Carvalho Chehab <mchehab@kernel•org>,
Linux-Next Mailing List <linux-next@vger•kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Sakari Ailus <sakari.ailus@linux•intel.com>,
Linus Walleij <linus.walleij@linaro•org>,
Alan Cox <alan@linux•intel.com>,
Andy Shevchenko <andriy.shevchenko@linux•intel.com>
Subject: Re: linux-next: manual merge of the staging tree with the v4l-dvb tree
Date: Sat, 26 May 2018 14:45:39 +1000 [thread overview]
Message-ID: <20180526144539.242ec752@canb.auug.org.au> (raw)
In-Reply-To: <20180517070657.642d3784@vento.lan>
[-- Attachment #1: Type: text/plain, Size: 1806 bytes --]
Hi Mauro,
On Thu, 17 May 2018 07:06:57 -0300 Mauro Carvalho Chehab <mchehab+samsung@kernel•org> wrote:
>
> What do you use in order to check it? Maybe we could have some git
> hook running such check, in order to prevent merging patches without
> the right SOBs.
I run the script below on the range of new commits each time a fetch a
tree ...
--
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 "$@"
------------------------------------------------------------------------
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-05-26 4:45 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 4:17 linux-next: manual merge of the staging tree with the v4l-dvb tree Stephen Rothwell
2018-05-17 7:22 ` Greg KH
2018-05-17 10:06 ` Mauro Carvalho Chehab
2018-05-26 4:45 ` Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-16 3:18 Stephen Rothwell
2024-10-16 5:48 ` Greg KH
2023-02-13 2:13 Stephen Rothwell
2023-02-13 7:05 ` Greg KH
2020-03-23 4:18 Stephen Rothwell
2020-03-23 9:56 ` Greg KH
2020-03-19 3:44 Stephen Rothwell
2020-03-19 8:30 ` Greg KH
2019-04-26 6:06 Stephen Rothwell
2019-04-27 6:36 ` Greg KH
2019-05-08 1:54 ` Stephen Rothwell
2019-04-04 2:43 Stephen Rothwell
2018-12-10 5:53 Stephen Rothwell
2018-10-08 4:53 Stephen Rothwell
2018-10-08 4:47 Stephen Rothwell
2017-11-02 4:30 Stephen Rothwell
2017-04-11 3:32 Stephen Rothwell
2017-04-06 3:34 Stephen Rothwell
2017-04-06 18:58 ` Sean Young
2017-04-06 19:19 ` Greg KH
2017-04-06 20:39 ` Sean Young
2017-04-06 21:51 ` Stephen Rothwell
2017-02-06 4:31 Stephen Rothwell
2017-02-06 8:37 ` Greg KH
2016-03-04 5:24 Stephen Rothwell
2016-03-04 16:58 ` Greg KH
2015-05-11 5:28 Stephen Rothwell
2015-05-11 18:34 ` Greg KH
2015-03-24 5:29 Stephen Rothwell
2014-11-24 8:10 Stephen Rothwell
2014-11-24 8:09 Stephen Rothwell
2014-11-05 4:37 Stephen Rothwell
2014-11-05 4:31 Stephen Rothwell
2014-11-05 4:29 Stephen Rothwell
2014-11-06 2:19 ` Greg KH
2014-07-16 6:46 Stephen Rothwell
2014-07-16 20:52 ` Greg KH
2014-03-18 6:15 Stephen Rothwell
2014-03-17 7:55 Stephen Rothwell
2014-03-17 11:01 ` Mauro Carvalho Chehab
2014-03-17 18:29 ` Greg KH
[not found] ` < 20140317162937.2ccdec83@infradead.org>
2014-03-17 19:29 ` Mauro Carvalho Chehab
2014-03-17 22:27 ` Russell King
2014-03-19 15:30 ` Greg KH
2014-03-21 12:24 ` Grant Likely
2014-03-21 14:37 ` Grant Likely
2011-09-27 6:10 Stephen Rothwell
2011-09-27 14:18 ` Greg KH
2011-09-27 20:14 ` Paul Gortmaker
2011-07-16 13:03 Stephen Rothwell
2011-07-17 9:15 ` Greg KH
2011-03-04 5:39 Stephen Rothwell
2011-03-04 17:14 ` Greg KH
2011-03-04 5:39 Stephen Rothwell
2011-03-04 17:14 ` Greg KH
2011-03-04 5:39 Stephen Rothwell
2011-03-04 17:13 ` Greg KH
2011-03-04 17:54 ` Mauro Carvalho Chehab
2011-03-04 21:23 ` Greg KH
2011-03-04 22:17 ` Mauro Carvalho Chehab
2011-03-04 5:38 Stephen Rothwell
2011-03-04 17:12 ` Greg KH
2011-03-04 5:38 Stephen Rothwell
2011-03-04 17:13 ` Greg KH
2011-03-04 5:38 Stephen Rothwell
2011-03-04 17:12 ` Greg KH
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=20180526144539.242ec752@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=alan@linux$(echo .)intel.com \
--cc=andriy.shevchenko@linux$(echo .)intel.com \
--cc=greg@kroah$(echo .)com \
--cc=linus.walleij@linaro$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=mchehab+samsung@kernel$(echo .)org \
--cc=mchehab@kernel$(echo .)org \
--cc=sakari.ailus@linux$(echo .)intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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