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

[PATCH v5 1/5] http.c: fix parsing of http.sslCertPasswordProtected variable

From
Kyle J. McKay <mackyle@gmail.com>
Date
Jul 15, 2013, 09:50 UTC
Message-ID
<49c213ce55978a1a655d8ea0d851974@f74d39fa044aa309eaea14b9f57fe79>
In-Reply-To
<506e5f642a838b95e0dd5b1f0fa1cfe@f74d39fa044aa309eaea14b9f57fe79>
From: Junio C Hamano <gitster@pobox.com>

The existing code triggers only when the configuration variable is set to true. Once the variable is set to true in a more generic configuration file (e.g. ~/.gitconfig), it cannot be overriden to false in the repository specific one (e.g. .git/config).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 http.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/http.c b/http.c
index 2d086ae..e65661e 100644
--- a/http.c
+++ b/http.c
@@ -160,8 +160,7 @@ static int http_options(const char *var, const char *value, void *cb)
 	if (!strcmp("http.sslcainfo", var))
 		return git_config_string(&ssl_cainfo, var, value);
 	if (!strcmp("http.sslcertpasswordprotected", var)) {
-		if (git_config_bool(var, value))
-			ssl_cert_password_required = 1;
+		ssl_cert_password_required = git_config_bool(var, value);
 		return 0;
 	}
 	if (!strcmp("http.ssltry", var)) {
-- 
1.8.3
Previous: Kyle J. McKayNext: Kyle J. McKay
Message 2 of 9 in “config: add support for http.<url>.* settings”
  1. 0/5 config: add support for http.<url>.* settingsKyle J. McKay, Jul 15, 2013
  2. 1/5 http.c: fix parsing of http.sslCertPasswordProtected variableKyle J. McKay, Jul 15, 2013
  3. 2/5 http.c: fix parsing of GIT_SSL_CERT_PASSWORD_PROTECTED variableKyle J. McKay, Jul 15, 2013
  4. 3/5 config: add support for http.<url>.* settingsKyle J. McKay, Jul 15, 2013
  5. 4/5 config: improve support for http.<url>.* settingsKyle J. McKay, Jul 15, 2013
  6. Eric SunshineJul 15, 2013
  7. Kyle J. McKayJul 16, 2013
  8. Eric SunshineJul 16, 2013
  9. 5/5 tests: add new test for the url_normalize functionKyle J. McKay, Jul 15, 2013

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.