From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id DF8C93989 for ; Thu, 1 Dec 2016 14:43:42 +0100 (CET) Received: by mail-wm0-f48.google.com with SMTP id a197so299136858wmd.0 for ; Thu, 01 Dec 2016 05:43:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=Ocow7ZxHSUJAwnjQoNud0foa5bZ4ab8i5BL5cqCb32I=; b=yjtNZyIPNaFoKzZLMMPih/bZlxI1w2MPWgXnEfF5T+XtxwoRjID41YSoOvYQH6ELnN TskbHf4eDdvdD6K/hzxadp3ybHWmO3tha8LKMJ2t15Mb4YAPDa+fSj5KUrWk6zN0OcHh ZOfMp+v1mIFzRDUODiis0OIpTjZJzDzEd6NhUiAW69LVCjvo5qpu/FdfyvlQZ6aqVUa0 q3OzDnUOqIZx72S6se/1i/vh20CzvYnMQEMTIaVcJlgnPU1g8IgpvWf0vbilQoHyOZhL fjMwB8zfjez5V5MMPQSpzoVAporYPlFB4Jf3EfpVx1dZSfTnjXYXX0swq0IiidBp6Bw/ it2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Ocow7ZxHSUJAwnjQoNud0foa5bZ4ab8i5BL5cqCb32I=; b=IQnH8WXZG2UAtC5kEYsC8odDAy/G57AhUYoa8gs3OQ+yZtnYFTuwtUAFa052dAnEuj DiVjQiwRm3o03ODfIf6NKI6lPlJpHYa98qvDmuoo5RIEoMXpSWOx8I7+1Uufr5pu8gty gGHu4TyKIL71FysyzynkyfmdBO/0IREmboZKdBAAWXYWmHeSq/xwGeS4QNLhDt/Am6GO BlSsLkFD2v6SaRmmwWXA5Xo4K0W02Lq8G+8znHXyKef7z186w910ilQey3OFsEVOwdWi idu+mESUOr2GRI0LE2Bb+C+QQ9s9aFUhXRxsslBbti27A5ngTyWTcXURS1pzEmh65waF Op9Q== X-Gm-Message-State: AKaTC007ZZdSaiB86C5PPk8+vSBuLhWWXCGc292yXVMgQl5CwUMCt2MF9xPw1eVrOamUrXUP X-Received: by 10.28.150.75 with SMTP id y72mr35286370wmd.47.1480599822338; Thu, 01 Dec 2016 05:43:42 -0800 (PST) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id c133sm985795wme.12.2016.12.01.05.43.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Dec 2016 05:43:41 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 1 Dec 2016 14:43:38 +0100 Message-Id: <1480599818-14911-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1479768194-6255-1-git-send-email-thomas.monjalon@6wind.com> References: <1479768194-6255-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v2] scripts: check cc stable mailing list in commit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2016 13:43:43 -0000 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 --- v2: fix option -N --- scripts/check-git-log.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh index 5f8a9fc..f79f0a2 100755 --- a/scripts/check-git-log.sh +++ b/scripts/check-git-log.sh @@ -47,12 +47,18 @@ if [ "$1" = '-h' -o "$1" = '--help' ] ; then exit fi +selfdir=$(dirname $(readlink -e $0)) range=${1:-origin/master..} +# convert -N to HEAD~N.. in order to comply with git-log-fixes.sh getopts +if printf -- $range | grep -q '^-[0-9]\+' ; then + range="HEAD$(printf -- $range | sed 's,^-,~,').." +fi 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 +197,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