DORMANTno replies

[PATCH] Fix compilation with NO_CURL

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:41
Subsystem: the rest · Maintainer: Linus Torvalds

There were a few places which did not cope well without curl.  This
fixes all of them.

Signed-off-by: Johannes Schindelin <redacted>
---
 transport.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/transport.c b/transport.c
index 6fe6ec8..438b557 100644
--- a/transport.c
+++ b/transport.c
@@ -1,7 +1,9 @@
 #include "cache.h"
 #include "transport.h"
 #include "run-command.h"
+#ifndef NO_CURL
 #include "http.h"
+#endif
 #include "pkt-line.h"
 #include "fetch-pack.h"
 #include "walker.h"
@@ -368,6 +370,7 @@ static int disconnect_walker(struct transport *transport)
 	return 0;
 }
 
+#ifndef NO_CURL
 static int curl_transport_push(struct transport *transport, int refspec_nr, const char **refspec, int flags) {
 	const char **argv;
 	int argc;
@@ -400,7 +403,6 @@ static int curl_transport_push(struct transport *transport, int refspec_nr, cons
 	return !!err;
 }
 
-#ifndef NO_CURL
 static int missing__target(int code, int result)
 {
 	return	/* file:// URL -- do we ever use one??? */
@@ -730,6 +732,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
 		ret->fetch = fetch_objs_via_rsync;
 		ret->push = rsync_transport_push;
 
+#ifndef NO_CURL
 	} else if (!prefixcmp(url, "http://")
 	        || !prefixcmp(url, "https://")
 	        || !prefixcmp(url, "ftp://")) {
@@ -737,6 +740,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
 		ret->fetch = fetch_objs_via_curl;
 		ret->push = curl_transport_push;
 		ret->disconnect = disconnect_walker;
+#endif
 
 	} else if (is_local(url) && is_file(url)) {
 		struct bundle_transport_data *data = xcalloc(1, sizeof(*data));
-- 
1.5.3.GIT
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help