* [PATCH,v2 0/1] Grok git config sendmail.to if available
@ 2011-03-16 3:53 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 13:19 ` [PATCH, v2 0/1] Grok git config sendmail.to if available Richard Purdie
0 siblings, 2 replies; 4+ messages in thread
From: Khem Raj @ 2011-03-16 3:53 UTC (permalink / raw)
To: OE core
includes Darren's review comments
Pull URL: git://git.openembedded.org/openembedded-core-contrib
Branch: kraj/scripts
Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/scripts
Thanks,
Khem Raj <raj.khem@gmail.com>
---
Khem Raj (1):
send-pull-request: Fetch TO email address from git config if
specified
scripts/send-pull-request | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH, v2 1/1] send-pull-request: Fetch TO email address from git config if specified
2011-03-16 3:53 [PATCH,v2 0/1] Grok git config sendmail.to if available Khem Raj
@ 2011-03-16 3:53 ` Khem Raj
2011-03-16 6:54 ` Darren Hart
2011-03-16 13:19 ` [PATCH, v2 0/1] Grok git config sendmail.to if available Richard Purdie
1 sibling, 1 reply; 4+ messages in thread
From: Khem Raj @ 2011-03-16 3:53 UTC (permalink / raw)
To: OE core
Usually people using git send-email has git config sendmail.to
configured to the usual mailing list or person so we harness that
here.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
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
;;
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:
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH, v2 1/1] send-pull-request: Fetch TO email address from git config if specified
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
0 siblings, 0 replies; 4+ messages in thread
From: Darren Hart @ 2011-03-16 6:54 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, v2 0/1] Grok git config sendmail.to if available
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 13:19 ` Richard Purdie
1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2011-03-16 13:19 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-03-15 at 20:53 -0700, Khem Raj wrote:
> includes Darren's review comments
>
> Pull URL: git://git.openembedded.org/openembedded-core-contrib
> Branch: kraj/scripts
> Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/scripts
>
> Thanks,
> Khem Raj <raj.khem@gmail.com>
> ---
>
>
> Khem Raj (1):
> send-pull-request: Fetch TO email address from git config if
> specified
>
> scripts/send-pull-request | 21 +++++++++++++++------
> 1 files changed, 15 insertions(+), 6 deletions(-)
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-16 13:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-03-16 13:19 ` [PATCH, v2 0/1] Grok git config sendmail.to if available Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox