@matheusbsbs / matheus-bagliano / commits / 750d930500
Fork 0

http.c: CURLOPT_NETRC_OPTIONAL is not available in ancient versions of cURL

Besides, we have already called easy_setopt with the option before coming to this function if it was available, so there is no need to repeat it here. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Mar 12, 2009 at 22:34 UTC 750d9305009a0f3fd14c0b5c5e62ae1eb2b18fda
1 file changed +1 -3
http.c
+1 -3
@@ -138,9 +138,7 @@ static int http_options(const char *var, const char *value, void *cb)
138
139 static void init_curl_http_auth(CURL *result)
140 {
141 - if (!user_name)
142 - curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
143 - else {
141 + if (user_name) {
142 struct strbuf up = STRBUF_INIT;
143 if (!user_pass)
144 user_pass = xstrdup(getpass("Password: "));