Skip to content

Commit e1bb1a3

Browse files
committed
send-email: honor transferencoding config option again
Since e67a228 ("send-email: automatically determine transfer-encoding"), the value of sendmail.transferencoding in the configuration file is ignored because $target_xfer_encoding is already defined by the time read_config sub parses the configuration file. Instead of initializing variable $target_xfer_encoding to 'auto' on definition, we have to set it to the default value of 'auto' if it is undefined after calling read_config() twice to parse the configuration file for "sendemail.transferencoding" and "sendemail.$ident.transferencoding". This is made trivial by the previous change. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2eb6752 commit e1bb1a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-send-email.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ sub do_edit {
231231
my (@suppress_cc);
232232
my ($auto_8bit_encoding);
233233
my ($compose_encoding);
234-
my $target_xfer_encoding = 'auto';
234+
my ($target_xfer_encoding);
235235

236236
my ($debug_net_smtp) = 0; # Net::SMTP, see send_message()
237237

@@ -271,7 +271,7 @@ sub do_edit {
271271
"from" => [\$sender],
272272
"assume8bitencoding" => [\$auto_8bit_encoding],
273273
"composeencoding" => [\$compose_encoding],
274-
"transferencoding" => [\$target_xfer_encoding],
274+
"transferencoding" => [\$target_xfer_encoding, 'auto'],
275275
);
276276

277277
my %config_path_settings = (

0 commit comments

Comments
 (0)