Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] added #define DEFAULT_MAX_REQUESTS for USE_CURL_MULTI mode

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:07
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Grégoire Barbier [off-list ref] writes:
Ok, please forget my patch and forgive my stupidity, I've juste
realized why I needed to define -DUSE_CURL_MULTI by hand in the
Makefile, I'm so stupid...
No, it is not your stupidity.

The http.h and http-*.c files assume that USE_CURL_MULTI is
internal and do not want the user to define that symbol from
outside.  It should be better documented and mistakes should be
prevented.

Perhaps we need something like like this.

diff --git a/http.h b/http.h
index aeba930..046b17f 100644
--- a/http.h
+++ b/http.h
@@ -8,6 +8,12 @@
 
 #include "strbuf.h"
 
+/*
+ * We detect based on the cURL version if multi-transfer is
+ * usable in this implementation and define this symbol accordingly.
+ */
+#undef USE_CURL_MULTI
+
 #if LIBCURL_VERSION_NUM >= 0x071000
 #define USE_CURL_MULTI
 #define DEFAULT_MAX_REQUESTS 5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help