Skip to content

Commit 35334b9

Browse files
committed
Merge branch 'jk/drop-ancient-curl' into pu
Some code in http.c that has bitrot is being removed. * jk/drop-ancient-curl: http: #error on too-old curl curl: remove ifdef'd code never used with curl >=7.19.4 http: drop support for curl < 7.19.4 http: drop support for curl < 7.16.0 http: drop support for curl < 7.11.1
2 parents 5082f8d + 01e08e4 commit 35334b9

File tree

6 files changed

+7
-240
lines changed

6 files changed

+7
-240
lines changed

Documentation/config.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,8 +2249,7 @@ http.maxRequests::
22492249
http.minSessions::
22502250
The number of curl sessions (counted across slots) to be kept across
22512251
requests. They will not be ended with curl_easy_cleanup() until
2252-
http_cleanup() is invoked. If USE_CURL_MULTI is not defined, this
2253-
value will be capped at 1. Defaults to 1.
2252+
http_cleanup() is invoked. Defaults to 1.
22542253

22552254
http.postBuffer::
22562255
Maximum size in bytes of the buffer used by smart HTTP

http-push.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,8 @@ static void curl_setup_http(CURL *curl, const char *url,
202202
curl_easy_setopt(curl, CURLOPT_INFILE, buffer);
203203
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer->buf.len);
204204
curl_easy_setopt(curl, CURLOPT_READFUNCTION, fread_buffer);
205-
#ifndef NO_CURL_IOCTL
206205
curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctl_buffer);
207206
curl_easy_setopt(curl, CURLOPT_IOCTLDATA, buffer);
208-
#endif
209207
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_fn);
210208
curl_easy_setopt(curl, CURLOPT_NOBODY, 0);
211209
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, custom_req);
@@ -248,8 +246,6 @@ static void process_response(void *callback_data)
248246
finish_request(request);
249247
}
250248

251-
#ifdef USE_CURL_MULTI
252-
253249
static void start_fetch_loose(struct transfer_request *request)
254250
{
255251
struct active_request_slot *slot;
@@ -298,7 +294,6 @@ static void start_mkcol(struct transfer_request *request)
298294
FREE_AND_NULL(request->url);
299295
}
300296
}
301-
#endif
302297

303298
static void start_fetch_packed(struct transfer_request *request)
304299
{
@@ -600,7 +595,6 @@ static void finish_request(struct transfer_request *request)
600595
}
601596
}
602597

603-
#ifdef USE_CURL_MULTI
604598
static int is_running_queue;
605599
static int fill_active_slot(void *unused)
606600
{
@@ -624,7 +618,6 @@ static int fill_active_slot(void *unused)
624618
}
625619
return 0;
626620
}
627-
#endif
628621

629622
static void get_remote_object_list(unsigned char parent);
630623

@@ -653,10 +646,8 @@ static void add_fetch_request(struct object *obj)
653646
request->next = request_queue_head;
654647
request_queue_head = request;
655648

656-
#ifdef USE_CURL_MULTI
657649
fill_active_slots();
658650
step_active_slots();
659-
#endif
660651
}
661652

662653
static int add_send_request(struct object *obj, struct remote_lock *lock)
@@ -691,10 +682,8 @@ static int add_send_request(struct object *obj, struct remote_lock *lock)
691682
request->next = request_queue_head;
692683
request_queue_head = request;
693684

694-
#ifdef USE_CURL_MULTI
695685
fill_active_slots();
696686
step_active_slots();
697-
#endif
698687

699688
return 1;
700689
}
@@ -1675,21 +1664,15 @@ static int delete_remote_branch(const char *pattern, int force)
16751664

16761665
static void run_request_queue(void)
16771666
{
1678-
#ifdef USE_CURL_MULTI
16791667
is_running_queue = 1;
16801668
fill_active_slots();
16811669
add_fill_function(NULL, fill_active_slot);
1682-
#endif
16831670
do {
16841671
finish_all_active_slots();
1685-
#ifdef USE_CURL_MULTI
16861672
fill_active_slots();
1687-
#endif
16881673
} while (request_queue_head && !aborted);
16891674

1690-
#ifdef USE_CURL_MULTI
16911675
is_running_queue = 0;
1692-
#endif
16931676
}
16941677

16951678
int cmd_main(int argc, const char **argv)
@@ -1763,10 +1746,6 @@ int cmd_main(int argc, const char **argv)
17631746
break;
17641747
}
17651748

1766-
#ifndef USE_CURL_MULTI
1767-
die("git-push is not available for http/https repository when not compiled with USE_CURL_MULTI");
1768-
#endif
1769-
17701749
if (!repo->url)
17711750
usage(http_push_usage);
17721751

@@ -1779,9 +1758,7 @@ int cmd_main(int argc, const char **argv)
17791758

17801759
http_init(NULL, repo->url, 1);
17811760

1782-
#ifdef USE_CURL_MULTI
17831761
is_running_queue = 0;
1784-
#endif
17851762

17861763
/* Verify DAV compliance/lock support */
17871764
if (!locking_available()) {

http-walker.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ static void release_object_request(struct object_request *obj_req)
122122
free(obj_req);
123123
}
124124

125-
#ifdef USE_CURL_MULTI
126125
static int fill_active_slot(struct walker *walker)
127126
{
128127
struct object_request *obj_req;
@@ -141,7 +140,6 @@ static int fill_active_slot(struct walker *walker)
141140
}
142141
return 0;
143142
}
144-
#endif
145143

146144
static void prefetch(struct walker *walker, unsigned char *sha1)
147145
{
@@ -158,10 +156,8 @@ static void prefetch(struct walker *walker, unsigned char *sha1)
158156
http_is_verbose = walker->get_verbosely;
159157
list_add_tail(&newreq->node, &object_queue_head);
160158

161-
#ifdef USE_CURL_MULTI
162159
fill_active_slots();
163160
step_active_slots();
164-
#endif
165161
}
166162

167163
static int is_alternate_allowed(const char *url)
@@ -349,11 +345,9 @@ static void fetch_alternates(struct walker *walker, const char *base)
349345
* wait for them to arrive and return to processing this request's
350346
* curl message
351347
*/
352-
#ifdef USE_CURL_MULTI
353348
while (cdata->got_alternates == 0) {
354349
step_active_slots();
355350
}
356-
#endif
357351

358352
/* Nothing to do if they've already been fetched */
359353
if (cdata->got_alternates == 1)
@@ -496,12 +490,8 @@ static int fetch_object(struct walker *walker, unsigned char *sha1)
496490
return 0;
497491
}
498492

499-
#ifdef USE_CURL_MULTI
500493
while (obj_req->state == WAITING)
501494
step_active_slots();
502-
#else
503-
start_object_request(walker, obj_req);
504-
#endif
505495

506496
/*
507497
* obj_req->req might change when fetching alternates in the callback
@@ -623,9 +613,7 @@ struct walker *get_http_walker(const char *url)
623613
walker->cleanup = cleanup;
624614
walker->data = data;
625615

626-
#ifdef USE_CURL_MULTI
627616
add_fill_function(walker, (int (*)(void *)) fill_active_slot);
628-
#endif
629617

630618
return walker;
631619
}

0 commit comments

Comments
 (0)