@@ -203,10 +203,8 @@ static void curl_setup_http(CURL *curl, const char *url,
203
203
curl_easy_setopt (curl , CURLOPT_INFILE , buffer );
204
204
curl_easy_setopt (curl , CURLOPT_INFILESIZE , buffer -> buf .len );
205
205
curl_easy_setopt (curl , CURLOPT_READFUNCTION , fread_buffer );
206
- #ifndef NO_CURL_IOCTL
207
206
curl_easy_setopt (curl , CURLOPT_IOCTLFUNCTION , ioctl_buffer );
208
207
curl_easy_setopt (curl , CURLOPT_IOCTLDATA , buffer );
209
- #endif
210
208
curl_easy_setopt (curl , CURLOPT_WRITEFUNCTION , write_fn );
211
209
curl_easy_setopt (curl , CURLOPT_NOBODY , 0 );
212
210
curl_easy_setopt (curl , CURLOPT_CUSTOMREQUEST , custom_req );
@@ -249,8 +247,6 @@ static void process_response(void *callback_data)
249
247
finish_request (request );
250
248
}
251
249
252
- #ifdef USE_CURL_MULTI
253
-
254
250
static void start_fetch_loose (struct transfer_request * request )
255
251
{
256
252
struct active_request_slot * slot ;
@@ -299,7 +295,6 @@ static void start_mkcol(struct transfer_request *request)
299
295
FREE_AND_NULL (request -> url );
300
296
}
301
297
}
302
- #endif
303
298
304
299
static void start_fetch_packed (struct transfer_request * request )
305
300
{
@@ -605,7 +600,6 @@ static void finish_request(struct transfer_request *request)
605
600
}
606
601
}
607
602
608
- #ifdef USE_CURL_MULTI
609
603
static int is_running_queue ;
610
604
static int fill_active_slot (void * unused )
611
605
{
@@ -629,7 +623,6 @@ static int fill_active_slot(void *unused)
629
623
}
630
624
return 0 ;
631
625
}
632
- #endif
633
626
634
627
static void get_remote_object_list (unsigned char parent );
635
628
@@ -658,10 +651,8 @@ static void add_fetch_request(struct object *obj)
658
651
request -> next = request_queue_head ;
659
652
request_queue_head = request ;
660
653
661
- #ifdef USE_CURL_MULTI
662
654
fill_active_slots ();
663
655
step_active_slots ();
664
- #endif
665
656
}
666
657
667
658
static int add_send_request (struct object * obj , struct remote_lock * lock )
@@ -696,10 +687,8 @@ static int add_send_request(struct object *obj, struct remote_lock *lock)
696
687
request -> next = request_queue_head ;
697
688
request_queue_head = request ;
698
689
699
- #ifdef USE_CURL_MULTI
700
690
fill_active_slots ();
701
691
step_active_slots ();
702
- #endif
703
692
704
693
return 1 ;
705
694
}
@@ -894,7 +883,7 @@ static struct remote_lock *lock_remote(const char *path, long timeout)
894
883
slot -> results = & results ;
895
884
curl_setup_http (slot -> curl , url , DAV_LOCK , & out_buffer , fwrite_buffer );
896
885
curl_easy_setopt (slot -> curl , CURLOPT_HTTPHEADER , dav_headers );
897
- curl_easy_setopt (slot -> curl , CURLOPT_FILE , & in_buffer );
886
+ curl_easy_setopt (slot -> curl , CURLOPT_WRITEDATA , & in_buffer );
898
887
899
888
CALLOC_ARRAY (lock , 1 );
900
889
lock -> timeout = -1 ;
@@ -1153,7 +1142,7 @@ static void remote_ls(const char *path, int flags,
1153
1142
curl_setup_http (slot -> curl , url , DAV_PROPFIND ,
1154
1143
& out_buffer , fwrite_buffer );
1155
1144
curl_easy_setopt (slot -> curl , CURLOPT_HTTPHEADER , dav_headers );
1156
- curl_easy_setopt (slot -> curl , CURLOPT_FILE , & in_buffer );
1145
+ curl_easy_setopt (slot -> curl , CURLOPT_WRITEDATA , & in_buffer );
1157
1146
1158
1147
if (start_active_slot (slot )) {
1159
1148
run_active_slot (slot );
@@ -1227,7 +1216,7 @@ static int locking_available(void)
1227
1216
curl_setup_http (slot -> curl , repo -> url , DAV_PROPFIND ,
1228
1217
& out_buffer , fwrite_buffer );
1229
1218
curl_easy_setopt (slot -> curl , CURLOPT_HTTPHEADER , dav_headers );
1230
- curl_easy_setopt (slot -> curl , CURLOPT_FILE , & in_buffer );
1219
+ curl_easy_setopt (slot -> curl , CURLOPT_WRITEDATA , & in_buffer );
1231
1220
1232
1221
if (start_active_slot (slot )) {
1233
1222
run_active_slot (slot );
@@ -1682,21 +1671,15 @@ static int delete_remote_branch(const char *pattern, int force)
1682
1671
1683
1672
static void run_request_queue (void )
1684
1673
{
1685
- #ifdef USE_CURL_MULTI
1686
1674
is_running_queue = 1 ;
1687
1675
fill_active_slots ();
1688
1676
add_fill_function (NULL , fill_active_slot );
1689
- #endif
1690
1677
do {
1691
1678
finish_all_active_slots ();
1692
- #ifdef USE_CURL_MULTI
1693
1679
fill_active_slots ();
1694
- #endif
1695
1680
} while (request_queue_head && !aborted );
1696
1681
1697
- #ifdef USE_CURL_MULTI
1698
1682
is_running_queue = 0 ;
1699
- #endif
1700
1683
}
1701
1684
1702
1685
int cmd_main (int argc , const char * * argv )
@@ -1770,10 +1753,6 @@ int cmd_main(int argc, const char **argv)
1770
1753
break ;
1771
1754
}
1772
1755
1773
- #ifndef USE_CURL_MULTI
1774
- die ("git-push is not available for http/https repository when not compiled with USE_CURL_MULTI" );
1775
- #endif
1776
-
1777
1756
if (!repo -> url )
1778
1757
usage (http_push_usage );
1779
1758
@@ -1786,9 +1765,7 @@ int cmd_main(int argc, const char **argv)
1786
1765
1787
1766
http_init (NULL , repo -> url , 1 );
1788
1767
1789
- #ifdef USE_CURL_MULTI
1790
1768
is_running_queue = 0 ;
1791
- #endif
1792
1769
1793
1770
/* Verify DAV compliance/lock support */
1794
1771
if (!locking_available ()) {
0 commit comments