From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH] scripts: check cc stable mailing list in commit Date: Mon, 21 Nov 2016 23:43:14 +0100 Message-ID: <1479768194-6255-1-git-send-email-thomas.monjalon@6wind.com> To: dev@dpdk.org Return-path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 9F38A2BC8 for ; Mon, 21 Nov 2016 23:43:38 +0100 (CET) Received: by mail-wm0-f47.google.com with SMTP id t79so7176212wmt.0 for ; Mon, 21 Nov 2016 14:43:38 -0800 (PST) Received: from XPS13.localdomain (guy78-1-82-235-116-147.fbx.proxad.net. [82.235.116.147]) by smtp.gmail.com with ESMTPSA id g73sm21951318wme.16.2016.11.21.14.43.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Nov 2016 14:43:37 -0800 (PST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add a check for commits fixing a released bug. Such commits are found thanks to scripts/git-log-fixes.sh. They must be sent CC: stable@dpdk.org. In order to avoid forgetting CC, this mail header can be written in the git commit message. Signed-off-by: Thomas Monjalon --- scripts/check-git-log.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh index 5f8a9fc..4f98a7a 100755 --- a/scripts/check-git-log.sh +++ b/scripts/check-git-log.sh @@ -47,12 +47,14 @@ if [ "$1" = '-h' -o "$1" = '--help' ] ; then exit fi +selfdir=$(dirname $(readlink -e $0)) range=${1:-origin/master..} commits=$(git log --format='%h' --reverse $range) headlines=$(git log --format='%s' --reverse $range) bodylines=$(git log --format='%b' --reverse $range) fixes=$(git log --format='%h %s' --reverse $range | grep -i ': *fix' | cut -d' ' -f1) +stablefixes=$($selfdir/git-log-fixes.sh $range | sed '/(N\/A)$/d' | cut -d' ' -f2) tags=$(git log --format='%b' --reverse $range | grep -i -e 'by *:' -e 'fix.*:') bytag='\(Reported\|Suggested\|Signed-off\|Acked\|Reviewed\|Tested\)-by:' @@ -191,3 +193,10 @@ bad=$(for fixtag in $fixtags ; do printf "$fixtag" | grep -v "^$good$" done | sed 's,^,\t,') [ -z "$bad" ] || printf "Wrong 'Fixes' reference:\n$bad\n" + +# check CC:stable for fixes +bad=$(for fix in $stablefixes ; do + git log --format='%b' -1 $fix | grep -qi '^CC: *stable@dpdk.org' || + git log --format='\t%s' -1 $fix +done) +[ -z "$bad" ] || printf "Should CC: stable@dpdk.org\n$bad\n" -- 2.7.0