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

Re: [PATCH] Revert "http: don't always prompt for password"

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 13, 2011, 21:25 UTC
Message-ID
<7v62hkuptt.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20111213202508.GA12187@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> @@ -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?

Show 10 quoted lines
> @@ -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.
Previous: Matthieu MoyNext: Jeff King
Message 11 of 14 in “t5540: test DAV push with authentication”
  1. 1/2 t5540: test DAV push with authenticationJeff King, Dec 13, 2011
  2. Revert "http: don't always prompt for password"Jeff King, Dec 13, 2011
  3. Junio C HamanoDec 13, 2011
  4. Eric AdvinculaDec 13, 2011
  5. Jeff KingDec 13, 2011
  6. Jeff KingDec 13, 2011
  7. Jeff KingDec 13, 2011
  8. Jeff KingDec 14, 2011
  9. Junio C HamanoDec 14, 2011
  10. Matthieu MoyDec 14, 2011
  11. Junio C HamanoDec 13, 2011
  12. Jeff KingDec 13, 2011
  13. Sebastian SchuberthDec 13, 2011
  14. Jeff KingDec 13, 2011

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.