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 <aaron@aclindsay.com>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
fa29f36d99
commit
3c88e46f1a
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user