All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] devtools: make commits with stable tag outstanding
Date: Thu, 6 Apr 2017 14:31:55 +0800	[thread overview]
Message-ID: <20170406063155.GR18844@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <5048683.EcVWt1ukKe@xps13>

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 () # <hash>
> {
> 	if git log --format='%b' -1 $id | grep -qi '^Cc: *stable@dpdk.org' ; then
> 		echo 'S'
> 	else
> 		echo '-'
> 	endif
> }

  reply	other threads:[~2017-04-06  6:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23  2:49 [PATCH] devtools: make commits with stable tag outstanding Yuanhan Liu
2017-03-10 11:13 ` Thomas Monjalon
2017-04-06  6:31   ` Yuanhan Liu [this message]
2017-04-06  6:33 ` [PATCH v2] " Yuanhan Liu
2017-04-06 19:25   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170406063155.GR18844@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.