From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 130131DB1 for ; Thu, 6 Apr 2017 08:34:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491460472; x=1522996472; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=rB1bFB6HUHYYfs29rTvbTqDtqaSSPpsTFmJHu4x+DMg=; b=DChGrHD3INE+AriIkeyiKXrxvXujjl5OPZoRlGMXGc/mmHtD+0ia5zuF NxmBFBgLQRXfVgvg9LBY6u40EYO+IQ==; Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2017 23:34:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,283,1488873600"; d="scan'208";a="74215641" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga004.jf.intel.com with ESMTP; 05 Apr 2017 23:34:29 -0700 Date: Thu, 6 Apr 2017 14:31:55 +0800 From: Yuanhan Liu To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20170406063155.GR18844@yliu-dev.sh.intel.com> References: <1487818172-12910-1-git-send-email-yuanhan.liu@linux.intel.com> <5048683.EcVWt1ukKe@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5048683.EcVWt1ukKe@xps13> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] devtools: make commits with stable tag outstanding X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 06:34:32 -0000 On Fri, Mar 10, 2017 at 12:13:28PM +0100, Thomas Monjalon wrote: > 2017-02-23 10:49, Yuanhan Liu: > > So that, as a stable maintainer while picking commits to a stable release, > > I could pay less attention to those have it and pay more attention to those > > don't have it. > > Good idea > > > + stable="-" > > + git show $id | grep -qi 'Cc: .*stable@dpdk.org' && stable="S" > > Instead of git show, it is preferrable to get only the message content: > git log --format='%b' -1 $id > > The regex may miss a Cc: without space, and may match a Cc in the middle > of a sentence. > I suggest this one: > grep -qi '^Cc: *stable@dpdk.org' > > The script is written in the style "set -e" so it must be avoided to have > a "false" statement not catched. > It can be done in 2 ways: > > 1/ > git log --format='%b' -1 $id | grep -qi '^Cc: *stable@dpdk.org' && stable='S' || stable='-' > > 2/ > if git log --format='%b' -1 $id | grep -qi '^Cc: *stable@dpdk.org' ; then > stable='S' > else > stable='-' > endif > > We can also move it in a function in order to keep only the logic in the > "main" block: > stable=$(stable_tag $id) Looks good. Will send v2 soon. Thanks. --yliu > > # print a marker for stable tag presence > stable_tag () # > { > if git log --format='%b' -1 $id | grep -qi '^Cc: *stable@dpdk.org' ; then > echo 'S' > else > echo '-' > endif > }