All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH, v2 1/1] send-pull-request: Fetch TO email address from git config	if specified
Date: Tue, 15 Mar 2011 23:54:01 -0700	[thread overview]
Message-ID: <4D805E89.4050105@linux.intel.com> (raw)
In-Reply-To: <25530fcd5ccb232f0236a03d8fcd45167fa8488e.1300247367.git.raj.khem@gmail.com>

On 03/15/2011 08:53 PM, Khem Raj wrote:
> Usually people using git send-email has git config sendmail.to
> configured to the usual mailing list or person so we harness that
> here.

Right, looks sane to me.

>
> Signed-off-by: Khem Raj<raj.khem@gmail.com>

Acked-by: Darren Hart <dvhart@linux.intel.com>

Please see below all the same:

> ---
>   scripts/send-pull-request |   21 +++++++++++++++------
>   1 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> index 7f51a1b..3af2a9f 100755
> --- a/scripts/send-pull-request
> +++ b/scripts/send-pull-request
> @@ -109,15 +109,17 @@ if [ $AUTO -eq 1 ]; then
>       harvest_recipients CC "^.*-[Bb][Yy]: *"
>   fi
>
> -if [ -z "$TO" ]&&  [ -z "$CC" ]; then
> -    echo "ERROR: you have not specified any recipients."
> -    usage
> -    exit 1
> -fi
> -
>   case "$PULL_MTA" in
>       git)
>           FROM="$(git config sendemail.from)"
> +	AUTO_TO="$(git config sendemail.to)"
> +	if [ -n "$AUTO_TO" ]; then
> +	    if [ -n "$TO" ]; then
> +		TO="$TO,$AUTO_TO"
> +	    else
> +		TO="$AUTO_TO"
> +	    fi
> +	fi

Quite the abuse of tabs and spaces for indentation here, but judging 
from the contextual lines, I don't have any right to point the finger 
here :-) I'll clean up the whitespace after this hits master.

What's the rule in poky, tabs for bash, spaces for python?

--
Darren

>           ;;
>       sendmail)
>           if [ -z "$FROM" ]; then
> @@ -131,6 +133,13 @@ case "$PULL_MTA" in
>           ;;
>   esac
>
> +if [ -z "$TO" ]&&  [ -z "$CC" ]; then
> +    echo "ERROR: you have not specified any recipients."
> +    usage
> +    exit 1
> +fi
> +
> +
>   # Generate report for the user and require confirmation before sending
>   cat<<EOM
>   The following patches:

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



  reply	other threads:[~2011-03-16  6:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16  3:53 [PATCH,v2 0/1] Grok git config sendmail.to if available Khem Raj
2011-03-16  3:53 ` [PATCH, v2 1/1] send-pull-request: Fetch TO email address from git config if specified Khem Raj
2011-03-16  6:54   ` Darren Hart [this message]
2011-03-16 13:19 ` [PATCH, v2 0/1] Grok git config sendmail.to if available Richard Purdie

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=4D805E89.4050105@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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.