From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3F17937B8 for ; Wed, 30 Nov 2016 15:54:18 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 30 Nov 2016 06:54:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,574,1473145200"; d="scan'208";a="907191854" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.29]) ([10.237.220.29]) by orsmga003.jf.intel.com with ESMTP; 30 Nov 2016 06:54:15 -0800 To: Thomas Monjalon , dev@dpdk.org References: <1479768194-6255-1-git-send-email-thomas.monjalon@6wind.com> From: Ferruh Yigit Message-ID: <1b249c77-5685-8492-6f6b-3478a2731267@intel.com> Date: Wed, 30 Nov 2016 14:54:14 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <1479768194-6255-1-git-send-email-thomas.monjalon@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] 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: Wed, 30 Nov 2016 14:54:19 -0000 On 11/21/2016 10:43 PM, Thomas Monjalon wrote: > 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 I think this is useful, thanks for the patch. > --- > 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) This breaks the "check-git-log.sh -N" usage, since "-N" is not a valid range for git-log-fixes.sh. Generates warning: .../scripts/git-log-fixes.sh: illegal option -- 6 usage: git-log-fixes.sh [-h] > 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" This is good for developer, but since "CC: xx" tags removed when patch applied, this will generate warnings when run against existing history. I don't know what can be done for this. Or should we keep CC: tags in commit log perhaps? >