Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-05-28 12:23:43 +0300
committerJunio C Hamano <gitster@pobox.com>2021-05-28 12:38:07 +0300
commit119974e9e7f3569400aa1950529f69431534a617 (patch)
tree3d607c1b95b3a2cb67b8555af3a90a7b1d6e30ae /git-send-email.perl
parent671818ab0b8206481d38054477059fee46db0ba3 (diff)
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>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl9
1 files changed, 1 insertions, 8 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 9a1a4898e3..e2fe112aa5 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -287,6 +287,7 @@ my %config_bool_settings = (
);
my %config_settings = (
+ "smtpencryption" => \$smtp_encryption,
"smtpserver" => \$smtp_server,
"smtpserverport" => \$smtp_server_port,
"smtpserveroption" => \@smtp_server_options,
@@ -387,14 +388,6 @@ sub read_config {
$$target = $v;
}
}
-
- if (!defined $smtp_encryption) {
- my $setting = "$prefix.smtpencryption";
- my $enc = Git::config(@repo, $setting);
- return unless defined $enc;
- return if $configured->{$setting}++;
- $smtp_encryption = $enc;
- }
}
# sendemail.identity yields to --identity. We must parse this