]> git.ipfire.org Git - thirdparty/git.git/commitdiff
http: drop the check for an empty proxy password before approving
authorJohn Szakmeister <john@szakmeister.net>
Fri, 12 Mar 2021 02:40:27 +0000 (21:40 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Mar 2021 06:17:10 +0000 (22:17 -0800)
credential_approve() already checks for a non-empty password before
saving, so there's no need to do the extra check here.

Signed-off-by: John Szakmeister <john@szakmeister.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c

diff --git a/http.c b/http.c
index 60d01c6e83907f8e6f92d9308d48818a95c7dfdb..3aeabf0947d655359790fdadb5594519cd29d02c 100644 (file)
--- a/http.c
+++ b/http.c
@@ -1635,8 +1635,7 @@ static int handle_curl_result(struct slot_results *results)
 
        if (results->curl_result == CURLE_OK) {
                credential_approve(&http_auth);
-               if (proxy_auth.password)
-                       credential_approve(&proxy_auth);
+               credential_approve(&proxy_auth);
                credential_approve(&cert_auth);
                return HTTP_OK;
        } else if (results->curl_result == CURLE_SSL_CERTPROBLEM) {