From 3c88e46f1a4328f594cbdcd6109034d9fb9a1b56 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Fri, 2 Nov 2018 05:52:38 -0400 Subject: send-email: avoid empty transfer encoding header Fix a small bug introduced by "7a36987ff (send-email: add an auto option for transfer encoding, 2018-07-14)". I saw the following message when setting --transfer-encoding for a file with the same encoding: $ git send-email --transfer-encoding=8bit example.patch Use of uninitialized value $xfer_encoding in concatenation (.) or string at /usr/lib/git-core/git-send-email line 1744. The new tests are by brian m. carlson. Signed-off-by: Aaron Lindsay Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- git-send-email.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-send-email.perl') diff --git a/git-send-email.perl b/git-send-email.perl index f4c07908d2..6b5d746bde 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -1835,7 +1835,7 @@ sub apply_transfer_encoding { my $from = shift; my $to = shift; - return $message if ($from eq $to and $from ne '7bit'); + return ($message, $to) if ($from eq $to and $from ne '7bit'); require MIME::QuotedPrint; require MIME::Base64; -- cgit v1.2.3