summaryrefslogtreecommitdiffstats
path: root/scripts/send-pull-request
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/send-pull-request')
-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: