From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: git@vger.kernel.org, hjemli@gmail.com, gitster@pobox.com
Subject: [PATCH] Fix compilation with NO_CURL
Date: Mon, 15 Oct 2007 14:52:25 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0710151452001.25221@racer.site> (raw)
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
reply other threads:[~2007-10-15 13:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0710151452001.25221@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hjemli@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).