* [PATCH] Fix compilation with NO_CURL
@ 2007-10-15 13:52 Johannes Schindelin
0 siblings, 0 replies; only message in thread
From: Johannes Schindelin @ 2007-10-15 13:52 UTC (permalink / raw)
To: git, hjemli, gitster
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-15 13:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-15 13:52 [PATCH] Fix compilation with NO_CURL Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).