Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
Cc: <git@vger.kernel.org>
Subject: Re: [PATCH v4 3/4] imap_send: setup_curl: retreive credentials if not set in config file
Date: Fri, 15 Sep 2017 13:44:13 +0900	[thread overview]
Message-ID: <xmqqwp50y3j6.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <accffa40-3559-5f65-3149-aaa86a2278fc@morey-chaisemartin.com> (Nicolas Morey-Chaisemartin's message of "Thu, 14 Sep 2017 09:52:06 +0200")

Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com> writes:

> +	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.

  reply	other threads:[~2017-09-15  4:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-14  7:50 [PATCH v4 0/4] imap-send: Fix and enable curl by default Nicolas Morey-Chaisemartin
2017-09-14  7:51 ` [PATCH v4 1/4] imap-send: return with error if curl failed Nicolas Morey-Chaisemartin
2017-09-14  7:52 ` [PATCH v4 2/4] imap-send: add wrapper to get server credentials if needed Nicolas Morey-Chaisemartin
2017-09-14  7:52 ` [PATCH v4 3/4] imap_send: setup_curl: retreive credentials if not set in config file Nicolas Morey-Chaisemartin
2017-09-15  4:44   ` Junio C Hamano [this message]
2017-09-15  4:50   ` Junio C Hamano
2017-09-14  7:52 ` [PATCH v4 4/4] imap-send: use curl by default when possible 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

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

  git send-email \
    --in-reply-to=xmqqwp50y3j6.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox