diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-09-25 00:30:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-25 00:30:33 -0700 |
commit | 41ef95aea7c8d8a337af693b601511e099cc468f (patch) | |
tree | 7c108f9cd0a30983f3397491763c85507e0b2875 /contrib/hooks | |
parent | bc12651b08fe295ac5647208f9b3f946145cc9b1 (diff) | |
parent | d1637a07f684acd80007723f94c4da9649d85525 (diff) | |
download | git-41ef95aea7c8d8a337af693b601511e099cc468f.tar.gz git-41ef95aea7c8d8a337af693b601511e099cc468f.tar.xz |
Merge branch 'maint'
* maint:
Do not over-quote the -f envelopesender value.
unexpected Make output (e.g. from --debug) causes build failure
Fixed minor typo in t/t9001-send-email.sh test command line.
Diffstat (limited to 'contrib/hooks')
-rw-r--r-- | contrib/hooks/post-receive-email | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email index c589a39a0..1f88099df 100644 --- a/contrib/hooks/post-receive-email +++ b/contrib/hooks/post-receive-email @@ -571,6 +571,15 @@ generate_delete_general_email() echo $LOGEND } +send_mail() +{ + if [ -n "$envelopesender" ]; then + /usr/sbin/sendmail -t -f "$envelopesender" + else + /usr/sbin/sendmail -t + fi +} + # ---------------------------- main() # --- Constants @@ -607,13 +616,8 @@ if [ -n "$1" -a -n "$2" -a -n "$3" ]; then # 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 |