Hi Peter,

On Saturday, 4 November 2017 1:50:21 PM NZDT Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-core-boun...@lists.openembedded.org
> > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of
> > Paul Eggleton
> > Sent: den 3 november 2017 04:16
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH 3/3] scripts/send-pull-request: allow -C to
> > be used multiple times
> > 
> > Allow -C to be specified multiple times in order to CC multiple people
> > instead of only taking the last specified value. (You can already use
> > commas to separate multiple recipients, but it makes sense to support
> > this usage as well as commas as separators may not be immediately
> > obvious).
> > 
> > Signed-off-by: Paul Eggleton <paul.eggle...@linux.intel.com>
> > ---
> >  scripts/send-pull-request | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> > index 883deac..baa907d 100755
> > --- a/scripts/send-pull-request
> > +++ b/scripts/send-pull-request
> > @@ -82,7 +82,7 @@ while getopts "acC:hp:t:" OPT; do
> >             GITSOBCC="--signed-off-by-cc"
> >             ;;
> >     C)
> > -           EXTRA_CC="$OPTARG"
> > +           EXTRA_CC="$EXTRA_CC,$OPTARG"
> 
> That will introduce a leading comma in $EXTRA_CC, which in turn will 
> lead to a --cc='' option being passed to git send-email. You can avoid 
> that by doing:

Sure, but I did test this and that didn't appear to have any ill effect. I 
agree that it's tidier not to be passing such options to git though, so I'll 
send a v2.


> You can also rewrite the case statement for -t in a similar way:
> 
>       t)
>               TO="${TO:+$TO,}$OPTARG"
>               ;;
> 
> Similarly, you can rewrite the code that assigns AUTO_CC in 
> harvest_recipients() as:
> 
>                               AUTO_CC="${AUTO_CC:+$AUTO_CC,}$EMAIL"
> 
> And if you replace:
> 
> unset TO
> 
> near the beginning of the script with:
> 
> TO=$(git config sendmail.to)
> 
> you can remove everything related to AUTO_TO.

I'm not sure I'll get to this, but if I don't perhaps you could?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to