From 85d81a757e495fe74d8a403f813d3748e832c112 Mon Sep 17 00:00:00 2001 From: Glenn Rempe Date: Mon, 24 Sep 2007 13:33:38 -0700 Subject: Fixed minor typo in t/t9001-send-email.sh test command line. The git-send-email command line in the test was missing a single hyphen. Signed-off-by: Glenn Rempe Signed-off-by: Junio C Hamano diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index e9ea33c..83f9470 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -30,7 +30,7 @@ test_expect_success 'Extract patches' ' ' test_expect_success 'Send patches' ' - git send-email -from="Example " --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors + git send-email --from="Example " --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors ' cat >expected <<\EOF -- cgit v0.10.2-6-g49f6 From e883932f7dc83ea69a990cba656464d5315f3300 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 25 Sep 2007 08:42:16 +0200 Subject: unexpected Make output (e.g. from --debug) causes build failure Without this, the extra output produced e.g., by "make --debug" would go into $INSTLIBDIR and then cause the sed command to fail. Signed-off-by: Jim Meyering Signed-off-by: Junio C Hamano diff --git a/Makefile b/Makefile index dace211..42ba1d0 100644 --- a/Makefile +++ b/Makefile @@ -783,7 +783,7 @@ perl/perl.mak: GIT-CFLAGS $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl $(QUIET_GEN)$(RM) $@ $@+ && \ - INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \ + INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \ sed -e '1{' \ -e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \ -e ' h' \ -- cgit v0.10.2-6-g49f6 From d1637a07f684acd80007723f94c4da9649d85525 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 25 Sep 2007 08:48:59 +0200 Subject: Do not over-quote the -f envelopesender value. 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 Signed-off-by: Junio C Hamano diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email index c589a39..1f88099 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 -- cgit v0.10.2-6-g49f6