Skip to content

Commit 41ef95a

Browse files
committed
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.
2 parents bc12651 + d1637a0 commit 41ef95a

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ perl/perl.mak: GIT-CFLAGS
805805

806806
$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
807807
$(QUIET_GEN)$(RM) $@ $@+ && \
808-
INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \
808+
INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
809809
sed -e '1{' \
810810
-e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
811811
-e ' h' \

contrib/hooks/post-receive-email

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,15 @@ generate_delete_general_email()
571571
echo $LOGEND
572572
}
573573

574+
send_mail()
575+
{
576+
if [ -n "$envelopesender" ]; then
577+
/usr/sbin/sendmail -t -f "$envelopesender"
578+
else
579+
/usr/sbin/sendmail -t
580+
fi
581+
}
582+
574583
# ---------------------------- main()
575584

576585
# --- Constants
@@ -607,13 +616,8 @@ if [ -n "$1" -a -n "$2" -a -n "$3" ]; then
607616
# resend an email; they could redirect the output to sendmail themselves
608617
PAGER= generate_email $2 $3 $1
609618
else
610-
if [ -n "$envelopesender" ]; then
611-
envelopesender="-f '$envelopesender'"
612-
fi
613-
614619
while read oldrev newrev refname
615620
do
616-
generate_email $oldrev $newrev $refname |
617-
/usr/sbin/sendmail -t $envelopesender
621+
generate_email $oldrev $newrev $refname | send_mail
618622
done
619623
fi

t/t9001-send-email.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test_expect_success 'Extract patches' '
3030
'
3131

3232
test_expect_success 'Send patches' '
33-
git send-email -from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
33+
git send-email --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
3434
'
3535

3636
cat >expected <<\EOF

0 commit comments

Comments
 (0)