git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Gaffney <mr.gaffo@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Mike Ralphson <mike.ralphson@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH][v2] http authentication via prompts (with correct line lengths)
Date: Fri, 13 Mar 2009 07:47:30 -0500	[thread overview]
Message-ID: <49BA55E2.1060604@gmail.com> (raw)
In-Reply-To: <7vsklihsti.fsf@gitster.siamese.dyndns.org>

I was going to try and clean this up this weekend or early next week. I'm also
trying to encourage open source submissions at work and was using this
as an example patch to get people going (we need the fix to use git). So
I do plan finishing this, just have to do it when I have time.

Daniel, thanks for the link, I had been wondering what was introduced when in curl.

-Mike

Junio C Hamano wrote:
> Mike Ralphson <mike.ralphson@gmail.com> writes:
> 
>> Elsewhere we seem to protect use of CURL_NETRC_OPTIONAL by checking
>> for LIBCURL_VERSION_NUM >= 0x070907. I have an ancient curl here
>> (curl-7.9.3-2ssl) which doesn't seem to have this option, so building
>> next is broken on AIX for me from this morning (c33976cb).
> 
> Yeah, I did this as "How about doing it this way without adding a band-aid
> configuration options" demonstration, and meant to clean it up (rather,
> meant to wait for the original submitter to clean-up) before moving it
> forward, but I forgot.  Sorry about that.
> 
> How does this look?
> 
> http://curl.haxx.se/libcurl/c/curl_easy_setopt.html seems to say "added in
> 7.X.Y" for some options but does say when CURLOPT_USERPWD was added, so I
> am assuming it was available even in very early versions...
> 
> -- >8 --
> From 750d9305009a0f3fd14c0b5c5e62ae1eb2b18fda Mon Sep 17 00:00:00 2001
> From: Junio C Hamano <gitster@pobox.com>
> Date: Thu, 12 Mar 2009 22:34:43 -0700
> Subject: [PATCH] http.c: CURLOPT_NETRC_OPTIONAL is not available in ancient versions of cURL
> 
> Besides, we have already called easy_setopt with the option before coming
> to this function if it was available, so there is no need to repeat it
> here.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  http.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/http.c b/http.c
> index b8f947e..2fc55d6 100644
> --- a/http.c
> +++ b/http.c
> @@ -138,9 +138,7 @@ static int http_options(const char *var, const char *value, void *cb)
>  
>  static void init_curl_http_auth(CURL *result)
>  {
> -	if (!user_name)
> -		curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
> -	else {
> +	if (user_name) {
>  		struct strbuf up = STRBUF_INIT;
>  		if (!user_pass)
>  			user_pass = xstrdup(getpass("Password: "));

-- 
-Mike Gaffney (http://rdocul.us)

  parent reply	other threads:[~2009-03-13 12:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-10  0:08 [PATCH][v2] http authentication via prompts (with correct line lengths) Mike Gaffney
2009-03-10  0:37 ` Junio C Hamano
2009-03-10  0:45   ` Johannes Schindelin
2009-03-10  3:25     ` Mike Gaffney
2009-03-10 10:43       ` Johannes Schindelin
2009-03-10 15:33         ` Mike Gaffney
2009-03-10  4:46   ` Mike Gaffney
2009-03-10  6:34     ` Junio C Hamano
2009-03-10  8:08       ` Daniel Stenberg
2009-03-10  8:35         ` Junio C Hamano
2009-03-12  8:53       ` Mike Ralphson
2009-03-12  8:59         ` Daniel Stenberg
2009-03-12  9:12           ` Mike Ralphson
2009-03-12  9:24             ` Daniel Stenberg
2009-03-13  5:53         ` Junio C Hamano
2009-03-13  7:58           ` Daniel Stenberg
2009-03-13 10:53           ` Mike Ralphson
2009-03-14  5:55             ` Junio C Hamano
2009-03-13 12:47           ` Mike Gaffney [this message]
2009-03-14  6:43             ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2009-03-17  5:15 Amos King
2009-03-17  6:27 ` Junio C Hamano
2009-03-17  6:47   ` Junio C Hamano
2009-03-17 16:24   ` Daniel Barkalow
2009-03-18 22:41     ` Amos King

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=49BA55E2.1060604@gmail.com \
    --to=mr.gaffo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mike.ralphson@gmail.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;
as well as URLs for NNTP newsgroup(s).