Skip to content

Commit 3f4ccd2

Browse files
committed
http.c: fix parsing of http.sslCertPasswordProtected variable
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 <[email protected]>
1 parent edca415 commit 3f4ccd2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

http.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ static int http_options(const char *var, const char *value, void *cb)
160160
if (!strcmp("http.sslcainfo", var))
161161
return git_config_string(&ssl_cainfo, var, value);
162162
if (!strcmp("http.sslcertpasswordprotected", var)) {
163-
if (git_config_bool(var, value))
164-
ssl_cert_password_required = 1;
163+
ssl_cert_password_required = git_config_bool(var, value);
165164
return 0;
166165
}
167166
if (!strcmp("http.ssltry", var)) {

0 commit comments

Comments
 (0)