Skip to content

Commit 3e26336

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 63de35d + 01e08e4 commit 3e26336

File tree

6 files changed

+6
-237
lines changed

6 files changed

+6
-237
lines changed

Documentation/config.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,8 +1990,7 @@ http.maxRequests::
19901990
http.minSessions::
19911991
The number of curl sessions (counted across slots) to be kept across
19921992
requests. They will not be ended with curl_easy_cleanup() until
1993-
http_cleanup() is invoked. If USE_CURL_MULTI is not defined, this
1994-
value will be capped at 1. Defaults to 1.
1993+
http_cleanup() is invoked. Defaults to 1.
19951994

19961995
http.postBuffer::
19971996
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
@@ -199,10 +199,8 @@ static void curl_setup_http(CURL *curl, const char *url,
199199
curl_easy_setopt(curl, CURLOPT_INFILE, buffer);
200200
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer->buf.len);
201201
curl_easy_setopt(curl, CURLOPT_READFUNCTION, fread_buffer);
202-
#ifndef NO_CURL_IOCTL
203202
curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctl_buffer);
204203
curl_easy_setopt(curl, CURLOPT_IOCTLDATA, buffer);
205-
#endif
206204
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_fn);
207205
curl_easy_setopt(curl, CURLOPT_NOBODY, 0);
208206
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, custom_req);
@@ -245,8 +243,6 @@ static void process_response(void *callback_data)
245243
finish_request(request);
246244
}
247245

248-
#ifdef USE_CURL_MULTI
249-
250246
static void start_fetch_loose(struct transfer_request *request)
251247
{
252248
struct active_request_slot *slot;
@@ -295,7 +291,6 @@ static void start_mkcol(struct transfer_request *request)
295291
FREE_AND_NULL(request->url);
296292
}
297293
}
298-
#endif
299294

300295
static void start_fetch_packed(struct transfer_request *request)
301296
{
@@ -597,7 +592,6 @@ static void finish_request(struct transfer_request *request)
597592
}
598593
}
599594

600-
#ifdef USE_CURL_MULTI
601595
static int is_running_queue;
602596
static int fill_active_slot(void *unused)
603597
{
@@ -621,7 +615,6 @@ static int fill_active_slot(void *unused)
621615
}
622616
return 0;
623617
}
624-
#endif
625618

626619
static void get_remote_object_list(unsigned char parent);
627620

@@ -650,10 +643,8 @@ static void add_fetch_request(struct object *obj)
650643
request->next = request_queue_head;
651644
request_queue_head = request;
652645

653-
#ifdef USE_CURL_MULTI
654646
fill_active_slots();
655647
step_active_slots();
656-
#endif
657648
}
658649

659650
static int add_send_request(struct object *obj, struct remote_lock *lock)
@@ -688,10 +679,8 @@ static int add_send_request(struct object *obj, struct remote_lock *lock)
688679
request->next = request_queue_head;
689680
request_queue_head = request;
690681

691-
#ifdef USE_CURL_MULTI
692682
fill_active_slots();
693683
step_active_slots();
694-
#endif
695684

696685
return 1;
697686
}
@@ -1667,21 +1656,15 @@ static int delete_remote_branch(const char *pattern, int force)
16671656

16681657
static void run_request_queue(void)
16691658
{
1670-
#ifdef USE_CURL_MULTI
16711659
is_running_queue = 1;
16721660
fill_active_slots();
16731661
add_fill_function(NULL, fill_active_slot);
1674-
#endif
16751662
do {
16761663
finish_all_active_slots();
1677-
#ifdef USE_CURL_MULTI
16781664
fill_active_slots();
1679-
#endif
16801665
} while (request_queue_head && !aborted);
16811666

1682-
#ifdef USE_CURL_MULTI
16831667
is_running_queue = 0;
1684-
#endif
16851668
}
16861669

16871670
int cmd_main(int argc, const char **argv)
@@ -1757,10 +1740,6 @@ int cmd_main(int argc, const char **argv)
17571740
break;
17581741
}
17591742

1760-
#ifndef USE_CURL_MULTI
1761-
die("git-push is not available for http/https repository when not compiled with USE_CURL_MULTI");
1762-
#endif
1763-
17641743
if (!repo->url)
17651744
usage(http_push_usage);
17661745

@@ -1773,9 +1752,7 @@ int cmd_main(int argc, const char **argv)
17731752

17741753
http_init(NULL, repo->url, 1);
17751754

1776-
#ifdef USE_CURL_MULTI
17771755
is_running_queue = 0;
1778-
#endif
17791756

17801757
/* Verify DAV compliance/lock support */
17811758
if (!locking_available()) {

http-walker.c

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

123-
#ifdef USE_CURL_MULTI
124123
static int fill_active_slot(struct walker *walker)
125124
{
126125
struct object_request *obj_req;
@@ -139,7 +138,6 @@ static int fill_active_slot(struct walker *walker)
139138
}
140139
return 0;
141140
}
142-
#endif
143141

144142
static void prefetch(struct walker *walker, unsigned char *sha1)
145143
{
@@ -156,10 +154,8 @@ static void prefetch(struct walker *walker, unsigned char *sha1)
156154
http_is_verbose = walker->get_verbosely;
157155
list_add_tail(&newreq->node, &object_queue_head);
158156

159-
#ifdef USE_CURL_MULTI
160157
fill_active_slots();
161158
step_active_slots();
162-
#endif
163159
}
164160

165161
static int is_alternate_allowed(const char *url)
@@ -347,11 +343,9 @@ static void fetch_alternates(struct walker *walker, const char *base)
347343
* wait for them to arrive and return to processing this request's
348344
* curl message
349345
*/
350-
#ifdef USE_CURL_MULTI
351346
while (cdata->got_alternates == 0) {
352347
step_active_slots();
353348
}
354-
#endif
355349

356350
/* Nothing to do if they've already been fetched */
357351
if (cdata->got_alternates == 1)
@@ -494,12 +488,8 @@ static int fetch_object(struct walker *walker, unsigned char *sha1)
494488
return 0;
495489
}
496490

497-
#ifdef USE_CURL_MULTI
498491
while (obj_req->state == WAITING)
499492
step_active_slots();
500-
#else
501-
start_object_request(walker, obj_req);
502-
#endif
503493

504494
/*
505495
* obj_req->req might change when fetching alternates in the callback
@@ -619,9 +609,7 @@ struct walker *get_http_walker(const char *url)
619609
walker->cleanup = cleanup;
620610
walker->data = data;
621611

622-
#ifdef USE_CURL_MULTI
623612
add_fill_function(walker, (int (*)(void *)) fill_active_slot);
624-
#endif
625613

626614
return walker;
627615
}

0 commit comments

Comments
 (0)