From: Jeff King <peff@peff.net>
To: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/4] imap-send: use curl by default
Date: Mon, 7 Aug 2017 16:01:26 -0400 [thread overview]
Message-ID: <20170807200126.fnbz57qd44vj43c6@sigill.intra.peff.net> (raw)
In-Reply-To: <71479602-fabc-1861-124b-90b26b952344@morey-chaisemartin.com>
On Mon, Aug 07, 2017 at 04:04:05PM +0200, Nicolas Morey-Chaisemartin wrote:
> Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
Thanks for moving forward with this.
Can you please flesh out your commit messages with some of the reasoning
and related discussion? I know from a nearby thread why we want to flip
the default, but people reading `git log` much later will not have that
context.
> diff --git a/imap-send.c b/imap-send.c
> index 90b8683ed..4ebc16437 100644
> --- a/imap-send.c
> +++ b/imap-send.c
> @@ -35,13 +35,7 @@ typedef void *SSL;
> #include "http.h"
> #endif
>
> -#if defined(USE_CURL_FOR_IMAP_SEND) && defined(NO_OPENSSL)
> -/* only available option */
> #define USE_CURL_DEFAULT 1
> -#else
> -/* strictly opt in */
> -#define USE_CURL_DEFAULT 0
> -#endif
I agree with the comments Martin made here. I think there are really two
levels of "default" we need to care about:
1. Build-time: do we default to requiring curl if you want imap-send
at all?
2. Run-time: if build with both implementations, which do we use by
default? Related, if there is only one implementation, what should
the default be?
I think the answer to (1) is that we still want to build imap-send
without USE_CURL_FOR_IMAP_SEND if the user doesn't have curl installed.
And your patch leaves that, which is good. Though if we are deprecating
it, we may want to issue a deprecation warning (eventually; we can still
switch the run-time default now, get more data on whether a
deprecation/switch is a good idea, and then later decide to deprecate).
For (2), you're trying to switch the default when both are built. But I
think it's important to continue to default to the old-style
implementation if that's the only thing that was built. Otherwise it
effectively becomes the build-time deprecation warning, and we're not
quite ready for that.
So I think this maybe needs to be:
#if defined(USE_CURL_FOR_IMAP_SEND)
/* Always default to curl if it's available. */
#define USE_CURL_DEFAULT 1
#else
/* We don't have curl, so continue to use the historical implementation */
#define USE_CURL_DEFAULT 0
#endif
-Peff
next prev parent reply other threads:[~2017-08-07 20:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c74c8c386f2c2d8b6cebd4addf925d0121986067.1502114584.git.nicolas@morey-chaisemartin.com>
2017-08-07 14:03 ` [PATCH 2/4] imap_send: setup_curl: prompt user for username/password if not set in config file Nicolas Morey-Chaisemartin
2017-08-07 14:04 ` [PATCH 3/4] imap_send: setup_curl: use server_conf parameter instead of the global variable Nicolas Morey-Chaisemartin
2017-08-07 16:34 ` Martin Ågren
2017-08-07 17:06 ` Nicolas Morey-Chaisemartin
2017-08-07 19:50 ` Jeff King
2017-08-07 14:04 ` [PATCH 4/4] imap-send: use curl by default Nicolas Morey-Chaisemartin
2017-08-07 16:37 ` Martin Ågren
2017-08-07 17:10 ` Nicolas Morey-Chaisemartin
2017-08-07 17:37 ` Martin Ågren
2017-08-07 20:01 ` Jeff King [this message]
2017-09-12 6:46 ` Junio C Hamano
2017-09-12 7:02 ` Junio C Hamano
2017-09-12 8:24 ` Nicolas Morey-Chaisemartin
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=20170807200126.fnbz57qd44vj43c6@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=nicolas@morey-chaisemartin.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).