git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix compilation with NO_CURL

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 15, 2007, 13:52 UTC
Message-ID
<Pine.LNX.4.64.0710151452001.25221@racer.site>

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 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
Message 1 of 1 in “Fix compilation with NO_CURL”
  1. Fix compilation with NO_CURLJohannes Schindelin, Oct 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.