Re: [PATCH v2 3/3] git-send-email: rename 'tls' to 'starttls'
- From
Drew DeVault <sir@cmpwn.com>
- Date
- Apr 11, 2021, 14:22 UTC
- Message-ID
- <CAKYMSVQ9ZM9.32H3OS6V9CLK9@taiga>
- In-Reply-To
- <87eefggb2q.fsf@evledraar.gmail.com>
On Sun Apr 11, 2021 at 10:17 AM EDT, Ævar Arnfjörð Bjarmason wrote:
Show 19 quoted lines
> > # 'default' encryption is none -- this only prevents a warning
> > $smtp_encryption = '' unless (defined $smtp_encryption);
> > -if ($smtp_encryption ne "" && $smtp_encryption ne "ssl" && $smtp_encryption ne "tls") {
> > - die __("Invalid smtp_encryption configuration: expected 'ssl', 'tls', or nothing.\n");
> > +if ($smtp_encryption eq "tls") {
> > + # "tls" is an alias for starttls for legacy reasons
> > + $smtp_encryption = "starttls";
> > +};
>
> Needless trailing ";".
>
> This and the preceding patch would be more readable if it was
> re-arranged in some way as to not rewrite the newly introduced lines
> between 2 and 3, maybe:
>
> {
> my $tls_name = "tls";
> if (....)
> }I disagree that this would be an improvement. It would make the patches a bit more readlable on their own, but the resulting code would introduce this bizzare variable which doesn't make sense out of context.