{"thread":{"id":"10291","subject":"[PATCH] Fix compilation with NO_CURL","startedAt":"2007-10-15T13:52:25Z","lastAt":"2007-10-15T13:52:25Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"55867","messageId":"Pine.LNX.4.64.0710151452001.25221@racer.site","threadId":"10291","inReplyTo":null,"subject":"[PATCH] Fix compilation with NO_CURL","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-15T13:52:25Z","receivedAt":"2007-10-15T13:52:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThere were a few places which did not cope well without curl.  This\nfixes all of them.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n transport.c |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/transport.c b/transport.c\nindex 6fe6ec8..438b557 100644\n--- a/transport.c\n+++ b/transport.c\n@@ -1,7 +1,9 @@\n #include \"cache.h\"\n #include \"transport.h\"\n #include \"run-command.h\"\n+#ifndef NO_CURL\n #include \"http.h\"\n+#endif\n #include \"pkt-line.h\"\n #include \"fetch-pack.h\"\n #include \"walker.h\"\n@@ -368,6 +370,7 @@ static int disconnect_walker(struct transport *transport)\n \treturn 0;\n }\n \n+#ifndef NO_CURL\n static int curl_transport_push(struct transport *transport, int refspec_nr, const char **refspec, int flags) {\n \tconst char **argv;\n \tint argc;\n@@ -400,7 +403,6 @@ static int curl_transport_push(struct transport *transport, int refspec_nr, cons\n \treturn !!err;\n }\n \n-#ifndef NO_CURL\n static int missing__target(int code, int result)\n {\n \treturn\t/* file:// URL -- do we ever use one??? */\n@@ -730,6 +732,7 @@ struct transport *transport_get(struct remote *remote, const char *url)\n \t\tret->fetch = fetch_objs_via_rsync;\n \t\tret->push = rsync_transport_push;\n \n+#ifndef NO_CURL\n \t} else if (!prefixcmp(url, \"http://\")\n \t        || !prefixcmp(url, \"https://\")\n \t        || !prefixcmp(url, \"ftp://\")) {\n@@ -737,6 +740,7 @@ struct transport *transport_get(struct remote *remote, const char *url)\n \t\tret->fetch = fetch_objs_via_curl;\n \t\tret->push = curl_transport_push;\n \t\tret->disconnect = disconnect_walker;\n+#endif\n \n \t} else if (is_local(url) && is_file(url)) {\n \t\tstruct bundle_transport_data *data = xcalloc(1, sizeof(*data));\n-- \n1.5.3.GIT\n"}]}