Skip to content

Commit 119974e

Browse files
avargitster
authored andcommitted
send-email: refactor sendemail.smtpencryption config parsing
With the removal of the support for sendemail.smtpssl in the preceding commit the parsing of sendemail.smtpencryption is no longer special, and can by moved to %config_settings. This gets us rid of an unconditional call to Git::config(), which as we'll see in subsequent commits matters for startup performance. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 671818a commit 119974e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

git-send-email.perl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ sub do_edit {
287287
);
288288

289289
my %config_settings = (
290+
"smtpencryption" => \$smtp_encryption,
290291
"smtpserver" => \$smtp_server,
291292
"smtpserverport" => \$smtp_server_port,
292293
"smtpserveroption" => \@smtp_server_options,
@@ -387,14 +388,6 @@ sub read_config {
387388
$$target = $v;
388389
}
389390
}
390-
391-
if (!defined $smtp_encryption) {
392-
my $setting = "$prefix.smtpencryption";
393-
my $enc = Git::config(@repo, $setting);
394-
return unless defined $enc;
395-
return if $configured->{$setting}++;
396-
$smtp_encryption = $enc;
397-
}
398391
}
399392

400393
# sendemail.identity yields to --identity. We must parse this

0 commit comments

Comments
 (0)