Skip to content

Commit 671818a

Browse files
avargitster
authored andcommitted
send-email: remove non-working support for "sendemail.smtpssl"
Remove the already dead code to support "sendemail.smtpssl" by finally removing the dead code supporting the configuration option. In f6bebd1 (git-send-email: add support for TLS via Net::SMTP::SSL, 2008-06-25) the --smtp-ssl command-line option was documented as deprecated, later in 65180c6 (List send-email config options in config.txt., 2009-07-22) the "sendemail.smtpssl" configuration option was also documented as such. Then in in 3ff1504 (send-email: fix regression in sendemail.identity parsing, 2019-05-17) I unintentionally removed support for it by introducing a bug in read_config(). As can be seen from the diff context we've already returned unless $enc i defined, so it's not possible for us to reach the "elsif" branch here. This code was therefore already dead since Git v2.23.0. So let's just remove it. We were already 11 years into a stated deprecation period of this variable when 3ff1504 landed, now it's around 13. Since it hasn't worked anyway for around 2 years it looks like we can safely remove it. The --smtp-ssl option is still deprecated, if someone cares they can follow-up and remove that too, but unlike the config option that one could still be in use in the wild. I'm just removing this code that's provably unused already. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 879be43 commit 671818a

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

Documentation/config/sendemail.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ sendemail.smtpEncryption::
88
See linkgit:git-send-email[1] for description. Note that this
99
setting is not subject to the 'identity' mechanism.
1010

11-
sendemail.smtpssl (deprecated)::
12-
Deprecated alias for 'sendemail.smtpEncryption = ssl'.
13-
1411
sendemail.smtpsslcertpath::
1512
Path to ca-certificates (either a directory or a single file).
1613
Set it to an empty string to disable certificate verification.

git-send-email.perl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,7 @@ sub read_config {
393393
my $enc = Git::config(@repo, $setting);
394394
return unless defined $enc;
395395
return if $configured->{$setting}++;
396-
if (defined $enc) {
397-
$smtp_encryption = $enc;
398-
} elsif (Git::config_bool(@repo, "$prefix.smtpssl")) {
399-
$smtp_encryption = 'ssl';
400-
}
396+
$smtp_encryption = $enc;
401397
}
402398
}
403399

0 commit comments

Comments
 (0)