summaryrefslogtreecommitdiffstats
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:54:17 +0000
commit9a1ee6de17b795f81a198f71fa004b8b02dee753 (patch)
tree7ccfeb8e8ff60fd29b290e96ef5c842ebc01d0ee /scripts
parentc6d6e49d07fdc13d0c84db600a4403ca29bfa2f9 (diff)
downloadpoky-9a1ee6de17b795f81a198f71fa004b8b02dee753.tar.gz
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. (From OE-Core rev: dae83a48f86fd5907cc999e912f476c89debd0bb) 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
109 harvest_recipients CC "^.*-[Bb][Yy]: *" 109 harvest_recipients CC "^.*-[Bb][Yy]: *"
110fi 110fi
111 111
112if [ -z "$TO" ] && [ -z "$CC" ]; then
113 echo "ERROR: you have not specified any recipients."
114 usage
115 exit 1
116fi
117
118case "$PULL_MTA" in 112case "$PULL_MTA" in
119 git) 113 git)
120 FROM="$(git config sendemail.from)" 114 FROM="$(git config sendemail.from)"
115 AUTO_TO="$(git config sendemail.to)"
116 if [ -n "$AUTO_TO" ]; then
117 if [ -n "$TO" ]; then
118 TO="$TO,$AUTO_TO"
119 else
120 TO="$AUTO_TO"
121 fi
122 fi
121 ;; 123 ;;
122 sendmail) 124 sendmail)
123 if [ -z "$FROM" ]; then 125 if [ -z "$FROM" ]; then
@@ -131,6 +133,13 @@ case "$PULL_MTA" in
131 ;; 133 ;;
132esac 134esac
133 135
136if [ -z "$TO" ] && [ -z "$CC" ]; then
137 echo "ERROR: you have not specified any recipients."
138 usage
139 exit 1
140fi
141
142
134# Generate report for the user and require confirmation before sending 143# Generate report for the user and require confirmation before sending
135cat <<EOM 144cat <<EOM
136The following patches: 145The following patches: