summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-03-12 07:07:12 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-16 13:20:14 +0000
commitdae83a48f86fd5907cc999e912f476c89debd0bb (patch)
treec17bda2cfd8e0eb7ce230ccfd6aae2b9bb7a270e /scripts
parent1e675fac4f7f22028700d7c5bc376d029af592e0 (diff)
downloadopenembedded-core-dae83a48f86fd5907cc999e912f476c89debd0bb.tar.gz
openembedded-core-dae83a48f86fd5907cc999e912f476c89debd0bb.tar.bz2
openembedded-core-dae83a48f86fd5907cc999e912f476c89debd0bb.zip
send-pull-request: Fetch TO email address from git config if specified
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> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/send-pull-request21
1 files changed, 15 insertions, 6 deletions
diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index 7f51a1b259..3af2a9fa7e 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: