From: Junio C Hamano Date: Tue, 13 Dec 2011 21:25:18 GMT Subject: Re: [PATCH] Revert "http: don't always prompt for password" Message-ID: <7v62hkuptt.fsf@alter.siamese.dyndns.org> In-Reply-To: <20111213202508.GA12187@sigill.intra.peff.net> Jeff King writes: > @@ -844,7 +846,7 @@ static int http_request(const char *url, void *result, int target, int options) > else if (missing_target(&results)) > ret = HTTP_MISSING_TARGET; > else if (results.http_code == 401) { > - if (user_name && user_pass) { > + if (user_name) { > ret = HTTP_NOAUTH; > } else { > /* In the credential series, this is where we declare the given credential is to be rejected (if we have both username and password), or ask them to be filled by calling credential_fill(), so I think the code in the credential series does not need this revert. Right? > @@ -853,8 +855,7 @@ static int http_request(const char *url, void *result, int target, int options) > * but that is non-portable. Using git_getpass() can at least be stubbed > * on other platforms with a different implementation if/when necessary. > */ > - if (!user_name) > - user_name = xstrdup(git_getpass_with_description("Username", description)); > + user_name = xstrdup(git_getpass_with_description("Username", description)); > init_curl_http_auth(slot->curl); > ret = HTTP_REAUTH; > } So is this one.