diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-08-24 15:32:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-24 15:32:36 -0700 |
commit | e48a623dea0c9170e4daa5e27e5bbc3f1ce84354 (patch) | |
tree | 308c5ecce933b4cc41885f20d530ce9cda5de3e5 /http-walker.c | |
parent | Merge branch 'ds/add-with-sparse-index' (diff) | |
parent | http: rename CURLOPT_FILE to CURLOPT_WRITEDATA (diff) | |
download | tgif-e48a623dea0c9170e4daa5e27e5bbc3f1ce84354.tar.xz |
Merge branch 'ab/http-drop-old-curl'
Support for ancient versions of cURL library (pre 7.19.4) has been
dropped.
* ab/http-drop-old-curl:
http: rename CURLOPT_FILE to CURLOPT_WRITEDATA
http: drop support for curl < 7.19.3 and < 7.17.0 (again)
http: drop support for curl < 7.19.4
http: drop support for curl < 7.16.0
http: drop support for curl < 7.11.1
Diffstat (limited to 'http-walker.c')
-rw-r--r-- | http-walker.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/http-walker.c b/http-walker.c index 90d8ecb57e..910fae539b 100644 --- a/http-walker.c +++ b/http-walker.c @@ -127,7 +127,6 @@ static void release_object_request(struct object_request *obj_req) free(obj_req); } -#ifdef USE_CURL_MULTI static int fill_active_slot(struct walker *walker) { struct object_request *obj_req; @@ -146,7 +145,6 @@ static int fill_active_slot(struct walker *walker) } return 0; } -#endif static void prefetch(struct walker *walker, unsigned char *sha1) { @@ -163,10 +161,8 @@ static void prefetch(struct walker *walker, unsigned char *sha1) http_is_verbose = walker->get_verbosely; list_add_tail(&newreq->node, &object_queue_head); -#ifdef USE_CURL_MULTI fill_active_slots(); step_active_slots(); -#endif } static int is_alternate_allowed(const char *url) @@ -357,11 +353,9 @@ static void fetch_alternates(struct walker *walker, const char *base) * wait for them to arrive and return to processing this request's * curl message */ -#ifdef USE_CURL_MULTI while (cdata->got_alternates == 0) { step_active_slots(); } -#endif /* Nothing to do if they've already been fetched */ if (cdata->got_alternates == 1) @@ -384,7 +378,7 @@ static void fetch_alternates(struct walker *walker, const char *base) alt_req.walker = walker; slot->callback_data = &alt_req; - curl_easy_setopt(slot->curl, CURLOPT_FILE, &buffer); + curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, &buffer); curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_buffer); curl_easy_setopt(slot->curl, CURLOPT_URL, url.buf); @@ -505,12 +499,8 @@ static int fetch_object(struct walker *walker, unsigned char *hash) return 0; } -#ifdef USE_CURL_MULTI while (obj_req->state == WAITING) step_active_slots(); -#else - start_object_request(walker, obj_req); -#endif /* * obj_req->req might change when fetching alternates in the callback @@ -623,9 +613,7 @@ struct walker *get_http_walker(const char *url) walker->cleanup = cleanup; walker->data = data; -#ifdef USE_CURL_MULTI add_fill_function(walker, (int (*)(void *)) fill_active_slot); -#endif return walker; } |