summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-12 22:34:43 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-12 22:42:19 -0700
commit750d9305009a0f3fd14c0b5c5e62ae1eb2b18fda (patch)
tree89b13370a8b5cf20063a989a66d937aa6c040708 /http.c
parentc33976cbc6d1895fca5c1683fba678e786ee3e58 (diff)
downloadgit-750d9305009a0f3fd14c0b5c5e62ae1eb2b18fda.tar.gz
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>
Diffstat (limited to 'http.c')
-rw-r--r--http.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/http.c b/http.c
index b8f947e405..2fc55d671e 100644
--- a/http.c
+++ b/http.c
@@ -138,9 +138,7 @@ static int http_options(const char *var, const char *value, void *cb)
static void init_curl_http_auth(CURL *result)
{
- if (!user_name)
- curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
- else {
+ if (user_name) {
struct strbuf up = STRBUF_INIT;
if (!user_pass)
user_pass = xstrdup(getpass("Password: "));