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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed May 28, 2021 at 11:23 UTC 119974e9e7f3569400aa1950529f69431534a617
1 file changed +1 -8
git-send-email.perl
+1 -8
@@ -287,6 +287,7 @@ my %config_bool_settings = (
287 );
288
289 my %config_settings = (
290 + "smtpencryption" => \$smtp_encryption,
291 "smtpserver" => \$smtp_server,
292 "smtpserverport" => \$smtp_server_port,
293 "smtpserveroption" => \@smtp_server_options,
@@ -387,14 +388,6 @@ sub read_config {
388 $$target = $v;
389 }
390 }
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 - }
391 }
392
393 # sendemail.identity yields to --identity. We must parse this