Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3090605imu; Sun, 9 Dec 2018 17:07:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/UKAbb861EtYX3eWp9lrkDwqBgbeU6bYN2eloq0AkiyXCNTOqthxHJgQuIZk6AAPtxy+U/x X-Received: by 2002:a63:5407:: with SMTP id i7mr9125342pgb.413.1544404040668; Sun, 09 Dec 2018 17:07:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544404040; cv=none; d=google.com; s=arc-20160816; b=LcXh4XFuovQoEpSwFPQJ6KUhkqS00Jgdj8ikxdH1jZeFscbRVTp5+XFTzL3IPr1u48 XQhFKZXxUzum/OWSAKIXRpOOjcIToEYiDipdxgM/5FFTgTWg6cROFoKfg4UcUF8Rhi7p /pbUpmVJ2lQYbpJPNeKjw6ktlwJHFnsGU6MvJYAgy4zs1BE3nct/AkRWbfTWw8YJotQX LazlvcR3acP/SRwfcAnidCvxvOBOFS6zJ6x1CrnjCUpxe8cpJ6MfNLtsD7JedNKVmBWv oVSDRVm+8Kcu+21DXPCiRkTp8N0eSedp5KXpO637cr4RD2uJNXLMKXXV578s2KoRbl6h tDUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=0zsvw4PBEOYvyB6jd51XBlIiE5N3Z+EaT/f3SEMU71s=; b=B8nJ2DdjJzOHgr5TFcQpx7aCZlzBvFRPIG2dqW4lIZSe2B8DAH6ORoYLKlzTUa4npn koEwoG6VA+C53L6MaI+JHfS9Z37JldgzFSWC63vzVWDmyUHYOE9nijZGSvQIJYJXA0DT cJR9UWvDdHvGlQEG9wpxwCJ9ZSL9SWb6u1y0h0QI7xLXDjVXgWbn1gT94KSeayxv7woc ddv91BvT1XwdKrXVQBlt4Zv04nolcqgUL3Xb415v8UQu+bzTwHnYRKqaqj/w/9/lhL8u pY9SXI9bsOt7Jpt0MZ+y7mrkv/bUnQYBisMnpwkq80EdkUneE+b3MG1cWdFnMxp/LL3K jt8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=hl3y9zCj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si8550112pgg.301.2018.12.09.17.07.02; Sun, 09 Dec 2018 17:07:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=hl3y9zCj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726362AbeLJAsx (ORCPT + 99 others); Sun, 9 Dec 2018 19:48:53 -0500 Received: from ozlabs.org ([203.11.71.1]:55953 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726255AbeLJAsw (ORCPT ); Sun, 9 Dec 2018 19:48:52 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 43CkwK0ksNz9s55; Mon, 10 Dec 2018 11:48:48 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1544402929; bh=Mcdj/tYBGFciyIyjDZYAypgwYvegFDGbx3PHWnQin3M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hl3y9zCjWw9h1urBP+qYnZvUMc4CDe206RqFp6DNOp8ya8Jt48xl4gpH6DaeWGbLd KK1tXXWIrml39QjpiOQWsZdo5k4hZ97MSKz4YT38An75EnautJ2CF0LCTFOonCu6Da h/WmlG/ZPrVfS1k1KgWPr7TDonCAsCPXJgefwFIw+SvospHbtl0hVL4PplKCZV7nL5 7QAQfxz5Uwuz2Uh4tEMc1MYJt5UeJqauTxDizT9OhMTlyS+ND8tV7iBklnmWtqI9tb lXNEujSTVLa1J0ZjUu6hE97nvtBY+ZKDvKOuOZeO2hmN9aDheFyr/+NwRYFnz4/kwv wJDrGF1YJ9zyg== Date: Mon, 10 Dec 2018 11:48:48 +1100 From: Stephen Rothwell To: David Miller Cc: sd@queasysnail.net, andrew@lunn.ch, hkallweit1@gmail.com, netdev@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, f.fainelli@gmail.com Subject: Re: linux-next: Signed-off-by missing for commits in the net-next tree Message-ID: <20181210114848.3f726482@canb.auug.org.au> In-Reply-To: <20181209.163152.1641648923109797638.davem@davemloft.net> References: <011f5be3-4bc1-2e64-0ddf-b43b8dbc4dcd@gmail.com> <20181209214907.GC21186@lunn.ch> <20181209232722.GA4425@bistromath.localdomain> <20181209.163152.1641648923109797638.davem@davemloft.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/bB1V6PnovWIlxnY4IgzmlMz"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/bB1V6PnovWIlxnY4IgzmlMz Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Dave, On Sun, 09 Dec 2018 16:31:52 -0800 (PST) David Miller = wrote: > > From: Sabrina Dubroca > Date: Mon, 10 Dec 2018 00:27:22 +0100 >=20 > > Maybe Stephen's script to detect those missing sign-offs could be run > > as a commit/apply hook by David? This happens regularly, sometimes > > dropping more than just a sign-off. =20 >=20 > Yeah, that would probably be a good idea, maybe something even on the > git.kernel.org side that won't let me push if I'm sending commits that > have this problem. That is fine as a last resort, but it is probably less disruptive to find these things before you try to push i.e. as part of the "apply the patch" otherwise you could end up having to rebase a whole lot of later commits. Anyway, here's my current version of my script. It just takes a commit range (anything you can pass to "git log"). You may want to drop the gitk invocation at the end. -------------------------------------------------------------------- #!/bin/bash if [ "$#" -lt 1 ]; then printf "Usage: %s \n", "$0" 1>&2 exit 1 fi commits=3D$(git rev-list --no-merges "$@") if [ -z "$commits" ]; then printf "No commits\n" exit 0 fi author_missing=3D committer_missing=3D print_commits() { local t=3D"$1" shift s=3D is=3D'is' its=3D'its' [ "$#" -gt 1 ] && { s=3D's' is=3D'are' its=3D'their' } printf "Commit%s\n\n" "$s" git log --no-walk --pretty=3D'format: %h ("%s")' "$@" printf "\n%s missing a Signed-off-by from %s %s%s.\n" "$is" "$its" "$t" "$= s" printf "\n" } for c in $commits; do ae=3D$(git log -1 --format=3D'<%ae>%n<%aE>%n %an %n %aN ' "$c" | sort -u) ce=3D$(git log -1 --format=3D'<%ce>%n<%cE>%n %cn %n %cN ' "$c" | sort -u) msg=3D$(git log -1 --format=3D'%b' "$c") sob=3D$(echo "$msg" | sed -En 's/^\s*Signed-off-by:?\s*/ /ip') am=3Dfalse cm=3Dfalse grep -i -F -q "$ae" <<<"$sob" || am=3Dtrue grep -i -F -q "$ce" <<<"$sob" || cm=3Dtrue "$am" && author_missing+=3D" $c" "$cm" && committer_missing+=3D" $c" done if [ "$author_missing" ]; then print_commits "author" $author_missing fi if [ "$committer_missing" ]; then print_commits "committer" $committer_missing fi exec gitk "$@" -------------------------------------------------------------------- --=20 Cheers, Stephen Rothwell --Sig_/bB1V6PnovWIlxnY4IgzmlMz Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAlwNt/AACgkQAVBC80lX 0GxHFwf/QChML+9/26RJSk5MYZiCdZ2C0Rj0Lq95hdPgnSw6OnVPFbOIjhrZpYwo rpkbbrju7ZgSMvmgl0BV+nJoUDmgkHfIu6HP6zwtZUhFt9BDWifDNOnHN2MYg2Q2 kVPUnfKv8r2+o7cyZZw3NwcS4PN5a0VW8ygEOFOEvxe3pu8m0tLlIBDcf2DjnixZ 8Muucn91s/5SioTtV4zpaYh6PCDeOrs1o2HWM4vL6u3N80h9lOwG6zfsDyryW+C2 LGhVUq9WDKvIZ+rUq7ykJJ/W8GpSu7F+lWZavruqcIdVYV4taAY5E3N/V4eB4QbA UEp/J0Xtigx3jbpMaq+VVCeH2eA3ag== =Idhg -----END PGP SIGNATURE----- --Sig_/bB1V6PnovWIlxnY4IgzmlMz--