Skip to content

Commit 750d930

Browse files
committed
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 <[email protected]>
1 parent c33976c commit 750d930

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

http.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ static int http_options(const char *var, const char *value, void *cb)
138138

139139
static void init_curl_http_auth(CURL *result)
140140
{
141-
if (!user_name)
142-
curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
143-
else {
141+
if (user_name) {
144142
struct strbuf up = STRBUF_INIT;
145143
if (!user_pass)
146144
user_pass = xstrdup(getpass("Password: "));

0 commit comments

Comments
 (0)