summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e883932)
raw | patch | inline | side by side (parent: e883932)
author | Jim Meyering <jim@meyering.net> | |
Tue, 25 Sep 2007 06:48:59 +0000 (08:48 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 25 Sep 2007 07:30:19 +0000 (00:30 -0700) |
Without this, the value passed to sendmail would have an extra set of
single quotes. At least exim's sendmail emulation would object to that:
exim: bad -f address "'list-addr@example.org'": malformed address: ' \
may not follow 'list-addr@example.org
error: hooks/post-receive exited with error code 1
Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
single quotes. At least exim's sendmail emulation would object to that:
exim: bad -f address "'list-addr@example.org'": malformed address: ' \
may not follow 'list-addr@example.org
error: hooks/post-receive exited with error code 1
Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/hooks/post-receive-email | patch | blob | history |
index c589a39a0c81818150575c74866a57619e1adf2a..1f88099df4b2213c0dca58b22567bc1d91e4adc2 100644 (file)
echo $LOGEND
}
+send_mail()
+{
+ if [ -n "$envelopesender" ]; then
+ /usr/sbin/sendmail -t -f "$envelopesender"
+ else
+ /usr/sbin/sendmail -t
+ fi
+}
+
# ---------------------------- main()
# --- Constants
# resend an email; they could redirect the output to sendmail themselves
PAGER= generate_email $2 $3 $1
else
- if [ -n "$envelopesender" ]; then
- envelopesender="-f '$envelopesender'"
- fi
-
while read oldrev newrev refname
do
- generate_email $oldrev $newrev $refname |
- /usr/sbin/sendmail -t $envelopesender
+ generate_email $oldrev $newrev $refname | send_mail
done
fi