git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 4/4] imap-send: use curl by default

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Aug 7, 2017, 17:37 UTC
Message-ID
<CAN0heSpSXRNgGeJ7TKOwPZJ3Puc1EvVUv1u84ghwDHhtE7=VHQ@mail.gmail.com>
In-Reply-To
<890d4028-1351-a7b9-1797-cf419d5f01e8@morey-chaisemartin.com>

On 7 August 2017 at 19:10, Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com> wrote:

Show 39 quoted lines
>
>
> Le 07/08/2017 à 18:37, Martin Ågren a écrit :
>> On 7 August 2017 at 16:04, Nicolas Morey-Chaisemartin
>> <nicolas@morey-chaisemartin.com> wrote:
>>> Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
>>> ---
>>>  imap-send.c | 6 ------
>>>  1 file changed, 6 deletions(-)
>>>
>>> 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
>>>
>>>  static int verbosity;
>>>  static int use_curl = USE_CURL_DEFAULT;
>> So this is now basically "static int use_curl = 1;".
>>
>> Do we need a compile-time escape-hatch in case someone really needs
>> to avoid curl, e.g., because they have a too old version? I suppose
>> there is a conceptual difference between the "default", i.e., the value
>> of USE_CURL_DEFAULT that is assigned to "use_curl", and the "default
>> default", i.e., the value that is normally assigned to USE_CURL_DEFAULT.
>>
>> Martin
>
> The curl code depends on USE_CURL_FOR_IMAP_SEND so even with use_curl == 1, it won't be an issue for people without curl (or old one).

I have just looked at the sources and haven't thought too hard about it, but doesn't it mean that compiling without USE_CURL_FOR_IMAP_SEND results in a binary such that you must use --no-curl or get used to seeing "warning: --curl not supported in this build"?

> I wasn't sure whether to drop the define or not and figure it might be worth keeping in case in change in the future for some reason.
> I don't mind dropping it and hardcofing the default to 1

I did not intend to suggest that. Just to be clear, I am very unfamiliar with most of the Git codebase. Please don't take anything I say as advice. :) As a question about something you have or haven't already thought about, sure. :)

Martin
Previous: Nicolas Morey-ChaisemartinNext: Jeff King
Message 9 of 13 in “imap_send: setup_curl: prompt user for username/password if not set in config file”
  1. 2/4 imap_send: setup_curl: prompt user for username/password if not set in config fileNicolas Morey-Chaisemartin, Aug 7, 2017
  2. 3/4 imap_send: setup_curl: use server_conf parameter instead of the global variableNicolas Morey-Chaisemartin, Aug 7, 2017
  3. Martin ÅgrenAug 7, 2017
  4. Nicolas Morey-ChaisemartinAug 7, 2017
  5. Jeff KingAug 7, 2017
  6. 4/4 imap-send: use curl by defaultNicolas Morey-Chaisemartin, Aug 7, 2017
  7. Martin ÅgrenAug 7, 2017
  8. Nicolas Morey-ChaisemartinAug 7, 2017
  9. Martin ÅgrenAug 7, 2017
  10. Jeff KingAug 7, 2017
  11. Junio C HamanoSep 12, 2017
  12. Junio C HamanoSep 12, 2017
  13. Nicolas Morey-ChaisemartinSep 12, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.