Merge branch 'jn/web' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 25 Sep 2007 22:17:22 +0000 (15:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Sep 2007 22:17:22 +0000 (15:17 -0700)
* jn/web:
gitweb: No difftree output for trivial merge
gitweb: Remove parse_from_to_diffinfo code from git_patchset_body

Makefile
contrib/hooks/post-receive-email
t/t9001-send-email.sh
index dace2112f903f6e5be8220deb3b1502496876bb1..42ba1d0fa7c7c2e1aeb5c499b09992d54b09cc21 100644 (file)
--- 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' \
index c589a39a0c81818150575c74866a57619e1adf2a..1f88099df4b2213c0dca58b22567bc1d91e4adc2 100644 (file)
@@ -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
index e9ea33c18d8e0ffa2612e52748bbab4bf13ef513..83f94702025276ffea4400490630e64c9eef068b 100755 (executable)
@@ -30,7 +30,7 @@ test_expect_success 'Extract patches' '
 '
 
 test_expect_success 'Send patches' '
-     git send-email -from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
+     git send-email --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
 '
 
 cat >expected <<\EOF