Thread (20 messages) 20 messages, 2 authors, 2021-04-13
STALE1891d

[PATCH 2/2] send-email: refactor sendemail.smtpencryption config parsing

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-04-11 14:43:35
Subsystem: the rest · Maintainer: Linus Torvalds

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.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 git-send-email.perl | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 877c7dd1a21..da28c6e8b4b 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -268,6 +268,7 @@ sub do_edit {
 );
 
 my %config_settings = (
+    "smtpencryption" => \$smtp_encryption,
     "smtpserver" => \$smtp_server,
     "smtpserverport" => \$smtp_server_port,
     "smtpserveroption" => \@smtp_server_options,
@@ -368,14 +369,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
-- 
2.31.1.623.g88b15a793d
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help