git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Eric Wong <e@80x24.org>
Cc: Todd Zullinger <tmz@pobox.com>, Chris Mayo <aklhfex@gmail.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Dennis Kaarsemaker <dennis@kaarsemaker.net>,
	git@vger.kernel.org
Subject: Re: [PATCH] send-email: remove documented requirement for Net::SMTP::SSL
Date: Tue, 28 May 2019 03:43:51 +0200	[thread overview]
Message-ID: <87h89fmjzc.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <20190528013128.ynvvci4ul2exiyef@dcvr>


On Tue, May 28 2019, Eric Wong wrote:

> Todd Zullinger <tmz@pobox.com> wrote:
>> I wonder if it's (separately from this change) worth
>> adjusting the conditional which sets $use_net_smtp_ssl to
>> use "Net::SMTP->can('starttls')" rather than a strict
>> version check?  (It might not be if using 'can' is too
>> fragile or would only benefit the Red Hat 7 packages which
>> likely won't officially be updated to a newer git with such
>> a change.)
>>
>> Something like:
>>
>> diff --git i/git-send-email.perl w/git-send-email.perl
>> index 24859a7bc3..84ac03994d 100755
>> --- i/git-send-email.perl
>> +++ w/git-send-email.perl
>> @@ -1465,7 +1465,7 @@ sub send_message {
>>  		}
>>
>>  		require Net::SMTP;
>> -		my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) < version->parse("2.34");
>> +		my $use_net_smtp_ssl = Net::SMTP->can('starttls') ? 0 : 1;
>>  		$smtp_domain ||= maildomain();
>>
>>  		if ($smtp_encryption eq 'ssl') {
>
> Looks much better to me.

Same, but to bikeshed a bit, at this point we can just do:
    
    diff --git a/git-send-email.perl b/git-send-email.perl
    index 24859a7bc3..4ad2091a49 100755
    --- a/git-send-email.perl
    +++ b/git-send-email.perl
    @@ -1468 +1467,0 @@ sub send_message {
    -               my $use_net_smtp_ssl = version->parse($Net::SMTP::VERSION) < version->parse("2.34");
    @@ -1485 +1484 @@ sub send_message {
    -                       if ($use_net_smtp_ssl) {
    +                       if (Net::SMTP->can('starttls')) {
    @@ -1507 +1506 @@ sub send_message {
    -                               if ($use_net_smtp_ssl) {
    +                               if (Net::SMTP->can('starttls')) {

  reply	other threads:[~2019-05-28  1:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-26 17:22 [PATCH] send-email: remove documented requirement for Net::SMTP::SSL Chris Mayo
2019-05-27 19:35 ` Eric Wong
2019-05-27 20:36   ` Ævar Arnfjörð Bjarmason
2019-05-27 23:43     ` brian m. carlson
2019-05-28  2:17       ` Ævar Arnfjörð Bjarmason
2019-05-28  1:22     ` Eric Wong
2019-05-28  0:05   ` Todd Zullinger
2019-05-28  1:31     ` Eric Wong
2019-05-28  1:43       ` Ævar Arnfjörð Bjarmason [this message]
2019-05-28  1:56         ` Todd Zullinger
2019-05-28  1:57         ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h89fmjzc.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=aklhfex@gmail.com \
    --cc=dennis@kaarsemaker.net \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=tmz@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).