All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>,
	ARM <linux-arm-kernel@lists.infradead.org>,
	Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Patrice Chotard <patrice.chotard@st.com>
Subject: Re: linux-next: Signed-off-by missing for commit in the arm-soc tree
Date: Fri, 16 Mar 2018 08:38:34 +1100	[thread overview]
Message-ID: <20180316083834.3aa0c438@canb.auug.org.au> (raw)
In-Reply-To: <CAK8P3a2-fUi0nnsLVJ6h_UuJCgwoNs2OEroYed2ofLd=FiPG0g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1663 bytes --]

Hi Arnd,

On Thu, 15 Mar 2018 22:06:29 +0100 Arnd Bergmann <arnd@arndb.de> wrote:
>
> What script do you use to find those? I guess I should check for
> missing signoffs as well when pulling a branch.

See below.  You can give it any commit range you would give e.g. gitk.
I run this using he ranges reported by the "git fetch" for each tree
each day.
-- 
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 --]

WARNING: multiple messages have this Message-ID (diff)
From: sfr@canb.auug.org.au (Stephen Rothwell)
To: linux-arm-kernel@lists.infradead.org
Subject: linux-next: Signed-off-by missing for commit in the arm-soc tree
Date: Fri, 16 Mar 2018 08:38:34 +1100	[thread overview]
Message-ID: <20180316083834.3aa0c438@canb.auug.org.au> (raw)
In-Reply-To: <CAK8P3a2-fUi0nnsLVJ6h_UuJCgwoNs2OEroYed2ofLd=FiPG0g@mail.gmail.com>

Hi Arnd,

On Thu, 15 Mar 2018 22:06:29 +0100 Arnd Bergmann <arnd@arndb.de> wrote:
>
> What script do you use to find those? I guess I should check for
> missing signoffs as well when pulling a branch.

See below.  You can give it any commit range you would give e.g. gitk.
I run this using he ranges reported by the "git fetch" for each tree
each day.
-- 
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 "$@"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180316/996e9229/attachment.sig>

  reply	other threads:[~2018-03-15 21:39 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 20:56 linux-next: Signed-off-by missing for commit in the arm-soc tree Stephen Rothwell
2018-03-15 20:56 ` Stephen Rothwell
2018-03-15 21:06 ` Arnd Bergmann
2018-03-15 21:06   ` Arnd Bergmann
2018-03-15 21:38   ` Stephen Rothwell [this message]
2018-03-15 21:38     ` Stephen Rothwell
2018-03-16  7:34   ` Patrice CHOTARD
2018-03-16  7:34     ` Patrice CHOTARD
2018-03-22 21:01     ` Alexandre Belloni
2018-03-22 21:01       ` Alexandre Belloni
2018-03-23  7:38       ` Patrice CHOTARD
2018-03-23  7:38         ` Patrice CHOTARD
  -- strict thread matches above, loose matches on Subject: below --
2023-10-16 21:53 Stephen Rothwell
2023-10-16 21:53 ` Stephen Rothwell
2023-10-17  9:29 ` Arnd Bergmann
2023-10-17  9:29   ` Arnd Bergmann
2023-10-19 11:26   ` Matthias Brugger
2023-10-19 11:26     ` Matthias Brugger
2023-03-19 21:23 Stephen Rothwell
2023-03-19 21:23 ` Stephen Rothwell
2023-03-19 21:27 ` Arnd Bergmann
2023-03-19 21:27   ` Arnd Bergmann
2023-02-13 20:55 Stephen Rothwell
2023-02-13 20:55 ` Stephen Rothwell
2023-02-13 20:57 ` Stephen Rothwell
2023-02-13 20:57   ` Stephen Rothwell
2023-02-13 21:14   ` Arnd Bergmann
2023-02-13 21:14     ` Arnd Bergmann
2022-03-08 21:19 Stephen Rothwell
2022-03-08 21:19 ` Stephen Rothwell
2022-03-02 11:19 Stephen Rothwell
2022-03-02 11:19 ` Stephen Rothwell
2022-03-01 20:56 Stephen Rothwell
2022-03-01 20:56 ` Stephen Rothwell
2022-03-01 20:57 ` Stephen Rothwell
2022-03-01 20:57   ` Stephen Rothwell
2022-03-01 21:14   ` Arnd Bergmann
2022-03-01 21:14     ` Arnd Bergmann
2021-10-20 21:14 Stephen Rothwell
2021-10-20 21:14 ` Stephen Rothwell
2021-10-14 22:29 Stephen Rothwell
2021-10-14 22:29 ` Stephen Rothwell
2021-10-14 23:21 ` Florian Fainelli
2021-10-14 23:21   ` Florian Fainelli
2021-10-15  8:21   ` nicolas saenz julienne
2021-10-15  8:21     ` nicolas saenz julienne
2021-04-05 22:11 Stephen Rothwell
2021-04-05 22:11 ` Stephen Rothwell
2021-04-05 22:11 ` Stephen Rothwell
2021-04-05 22:11   ` Stephen Rothwell
2021-04-06 21:44   ` Arnd Bergmann
2021-04-06 21:44     ` Arnd Bergmann
2021-04-07 11:46     ` Maxime Ripard
2021-04-07 11:46       ` Maxime Ripard
2021-02-09 21:18 Stephen Rothwell
2021-02-09 21:18 ` Stephen Rothwell
2021-02-02 19:57 Stephen Rothwell
2021-02-02 19:57 ` Stephen Rothwell
2021-02-02 20:04 ` Stephen Rothwell
2021-02-02 20:04   ` Stephen Rothwell
2021-02-02 20:54   ` Arnd Bergmann
2021-02-02 20:54     ` Arnd Bergmann
2020-12-09 21:35 Stephen Rothwell
2020-12-09 21:35 ` Stephen Rothwell
2020-12-09 22:02 ` Arnd Bergmann
2020-12-09 22:02   ` Arnd Bergmann
2020-12-09 11:01 Stephen Rothwell
2020-12-09 11:01 ` Stephen Rothwell
2020-05-21 22:24 Stephen Rothwell
2020-05-21 22:24 ` Stephen Rothwell
2020-05-22  1:27 ` Masahiro Yamada
2020-05-22  1:27   ` Masahiro Yamada
2020-05-22  8:09   ` Arnd Bergmann
2020-05-22  8:09     ` Arnd Bergmann
2020-04-19 22:11 Stephen Rothwell
2020-04-19 22:11 ` Stephen Rothwell
2020-04-19 22:13 ` Stephen Rothwell
2020-04-19 22:13   ` Stephen Rothwell
2020-04-20 15:18   ` Tony Lindgren
2020-04-20 15:18     ` Tony Lindgren
2020-04-20 19:44     ` Arnd Bergmann
2020-04-20 19:44       ` Arnd Bergmann
2020-01-12 19:58 Stephen Rothwell
2020-01-12 19:58 ` Stephen Rothwell
2020-01-12 19:59 ` Olof Johansson
2020-01-12 19:59   ` Olof Johansson
2020-01-13  0:38   ` Stephen Rothwell
2020-01-13  0:38     ` Stephen Rothwell
2020-01-13  8:17     ` Alexandre Torgue
2020-01-13  8:17       ` Alexandre Torgue
2020-01-13 11:46       ` Stephen Rothwell
2020-01-13 11:46         ` Stephen Rothwell
2020-01-13 17:52         ` Olof Johansson
2020-01-13 17:52           ` Olof Johansson
2020-01-16 19:58     ` Florian Fainelli
2020-01-16 19:58       ` Florian Fainelli
2020-01-17 18:45     ` Olof Johansson
2020-01-17 18:45       ` Olof Johansson
2020-01-09  8:56 Stephen Rothwell
2020-01-09  8:56 ` Stephen Rothwell
2019-06-25 22:12 Stephen Rothwell
2019-06-25 22:12 ` Stephen Rothwell
2019-06-25 22:15 ` Florian Fainelli
2019-06-25 22:15   ` Florian Fainelli
2018-11-03  3:57 Stephen Rothwell
2018-11-03  3:57 ` Stephen Rothwell
2018-11-03  5:31 ` Olof Johansson
2018-11-03  5:31   ` Olof Johansson
2018-05-14 21:22 Stephen Rothwell
2018-05-14 21:22 ` Stephen Rothwell
2018-05-15  7:15 ` Alexandre Torgue
2018-05-15  7:15   ` Alexandre Torgue
2018-05-26  4:34   ` Stephen Rothwell
2018-05-26  4:34     ` Stephen Rothwell
2018-01-23  5:16 Stephen Rothwell
2018-01-23  5:16 ` Stephen Rothwell
2018-01-23  9:16 ` Arnd Bergmann
2018-01-23  9:16   ` Arnd Bergmann
2017-12-03 21:32 Stephen Rothwell
2017-12-03 21:32 ` Stephen Rothwell
2017-12-04  3:41 ` Olof Johansson
2017-12-04  3:41   ` Olof Johansson
2017-12-04 18:02   ` Kevin Hilman
2017-12-04 18:02     ` Kevin Hilman
2017-08-30 13:07 Stephen Rothwell
2017-08-30 13:07 ` Stephen Rothwell
2017-08-30 13:19 ` Alexandre Belloni
2017-08-30 13:19   ` Alexandre Belloni
2017-08-30 16:21   ` Olof Johansson
2017-08-30 16:21     ` Olof Johansson
2017-08-30 16:42     ` Alexandre Belloni
2017-08-30 16:42       ` Alexandre Belloni
2017-08-30 17:21     ` Stephen Rothwell
2017-08-30 17:21       ` Stephen Rothwell

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=20180316083834.3aa0c438@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=patrice.chotard@st.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.