All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: <git@vger.kernel.org>, <peff@peff.net>
Subject: Re: [PATCH v3 4/4] imap-send: use curl by default
Date: Thu, 24 Aug 2017 09:24:15 +0200	[thread overview]
Message-ID: <6c1481b3-5025-a911-bbaf-aaa88343d859@morey-chaisemartin.com> (raw)
In-Reply-To: <xmqqpobmxc3a.fsf@gitster.mtv.corp.google.com>



Le 23/08/2017 à 22:28, Junio C Hamano a écrit :
> Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com> writes:
>
>> Now that curl is enable by default,
> s/enable/&d/; 
>
> But it is unclear what the above really means.  You certainly do not
> mean that [PATCH 1-3/4] somewhere tweaked our Makefile to always use
> libcurl and makes Git fail to build without it, but the above sounds
> as if that were the case.
>
>> use the curl implementation
>> for imap too.
> The Makefile for a long time by default set USE_CURL_FOR_IMAP_SEND
> to YesPlease when the version of cURL we have is recent enough, I
> think.  So I am not sure what you want to add with this change.
It did but apart from allowing the compilation of the code and enabling the --curl option to do something, it had no impact on the default runtime.
>> The goal is to validate feature parity between the legacy and
>> the curl implementation, deprecate thee legacy implementation
> s/thee/the/;

Yes this is confusing.
In the current state, even if build against a curl version supporting imap, curl is not used by default at runtime (unless OpenSSL was not available).
This patch changes this behavior.

>
>> later on and in the long term, hopefully drop it altogether.
>>
>> Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
>> ---
>>  imap-send.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
> Hmph, the patch itself is also confusing.
>
>> diff --git a/imap-send.c b/imap-send.c
>> index a74d011a9..58c191704 100644
>> --- a/imap-send.c
>> +++ b/imap-send.c
>> @@ -35,11 +35,11 @@ typedef void *SSL;
>>  #include "http.h"
>>  #endif
>>  
>> -#if defined(USE_CURL_FOR_IMAP_SEND) && defined(NO_OPENSSL)
>> -/* only available option */
>> +#if defined(USE_CURL_FOR_IMAP_SEND)
>> +/* Always default to curl if it's available. */
>>  #define USE_CURL_DEFAULT 1
> The original says "we want to use CURL, if Makefile tells us to
> *AND* if Makefile tells us not to use OpenSSL", which does not make
> much sense to me.  I wonder if the original is buggy and should have
> been using "|| defined(NO_OPENSSL)" there instead.  
I think the idea for this was that curl should be used when curl is available and OpenSSL is not (curl being the only solution for secured authentication in this case)

>
> Perhaps that is the bug you are fixing with this patch, and all the
> talk about curl is default we saw above is a red herring?  If that
> is the case, then instead of removing, turning "&&" into "||" may be
> a better fix.  I dunno.

As said before, the goal of this patch is to enable curl by default at runtime when it has been "enabled" at compile time.
I'll reword

Is something like this clearer ?
Author: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
Date:   Sun Aug 6 21:30:15 2017 +0200

    imap-send: use curl by default when possible
   
    Set curl as the runtime default when it is available.
    When linked against older curl versions (< 7_34_0) or without curl,
    use the legacy imap implementation.
   
    The goal is to validate feature parity between the legacy and
    the curl implementation, deprecate the legacy implementation
    later on and in the long term, hopefully drop it altogether.
   
    Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>



      reply	other threads:[~2017-08-24  7:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 15:55 [PATCH v3 0/4] imap-send: Fix and enable curl by default Nicolas Morey-Chaisemartin
2017-08-22 15:56 ` [PATCH v3 1/4] imap-send: return with error if curl failed Nicolas Morey-Chaisemartin
2017-08-23 20:10   ` Junio C Hamano
2017-08-23 20:12   ` Junio C Hamano
2017-08-24  6:57     ` Nicolas Morey-Chaisemartin
2017-08-22 15:56 ` [PATCH v3 2/4] imap-send: add wrapper to get server credentials if needed Nicolas Morey-Chaisemartin
2017-08-23 20:13   ` Junio C Hamano
2017-08-24  6:08     ` Nicolas Morey-Chaisemartin
2017-08-24 18:54       ` Junio C Hamano
2017-08-22 15:56 ` [PATCH v3 3/4] imap_send: setup_curl: retreive credentials if not set in config file Nicolas Morey-Chaisemartin
2017-08-22 15:56 ` [PATCH v3 4/4] imap-send: use curl by default Nicolas Morey-Chaisemartin
2017-08-23 20:28   ` Junio C Hamano
2017-08-24  7:24     ` Nicolas Morey-Chaisemartin [this message]

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

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

  git send-email \
    --in-reply-to=6c1481b3-5025-a911-bbaf-aaa88343d859@morey-chaisemartin.com \
    --to=nicolas@morey-chaisemartin.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.