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

Re: [PATCH v4 3/4] imap_send: setup_curl: retreive credentials if not set in config file

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2017, 04:44 UTC
Message-ID
<xmqqwp50y3j6.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<accffa40-3559-5f65-3149-aaa86a2278fc@morey-chaisemartin.com>
Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com> writes:
Show 5 quoted lines
> +	if (cred.username)
> +		if (res == CURLE_OK)
> +			credential_approve(&cred);
> +#if LIBCURL_VERSION_NUM >= 0x070d01
> +		else if (res == CURLE_LOGIN_DENIED)

A slight tangent. This is in line with the way in which we do conditional compilation to work with different versions of libCurl, but we recently had discussion on modernizing these version based conditional compilation to use feature based one in another topic. We may want to switch to

	#if defined(CURLE_LOGIN_DENIED)
		...

(cf. https://public-inbox.org/git/cover.1502462884.git.tgc@jupiterrise.com/ the entire thread).

No need to change _this_ patch in this series, but something to keep in mind planning for a future follow-up work to clean things up.

Thanks.
Previous: Nicolas Morey-ChaisemartinNext: Junio C Hamano
Message 4 of 7 in “imap-send: Fix and enable curl by default”
  1. 0/4 imap-send: Fix and enable curl by defaultNicolas Morey-Chaisemartin, Sep 14, 2017
  2. 2/4 imap-send: add wrapper to get server credentials if neededNicolas Morey-Chaisemartin, Sep 14, 2017
  3. 3/4 imap_send: setup_curl: retreive credentials if not set in config fileNicolas Morey-Chaisemartin, Sep 14, 2017
  4. Junio C HamanoSep 15, 2017
  5. Junio C HamanoSep 15, 2017
  6. 4/4 imap-send: use curl by default when possibleNicolas Morey-Chaisemartin, Sep 14, 2017
  7. 1/4 imap-send: return with error if curl failedNicolas Morey-Chaisemartin, Sep 14, 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.