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>
This commit is contained in:
Junio C Hamano 2009-03-12 22:34:43 -07:00
Родитель c33976cbc6
Коммит 750d930500
1 изменённых файлов: 1 добавлений и 3 удалений

4
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: "));