Some newer features of libcurl are used which are not strictly necessary
for http-pull. Use them only if libcurl is new enough to know about them.

Signed-off-by: Johannes Schindelin <[EMAIL PROTECTED]>

---

 http-pull.c |    6 ++++++
 1 files changed, 6 insertions

diff --git a/http-pull.c b/http-pull.c
--- a/http-pull.c
+++ b/http-pull.c
@@ -171,19 +171,25 @@ int main(int argc, char **argv)
        commit_id = argv[arg];
        url = argv[arg + 1];

+#if LIBCURL_VERSION_NUM >= 0x070800
        curl_global_init(CURL_GLOBAL_ALL);
+#endif

        curl = curl_easy_init();

        curl_ssl_verify = gitenv("GIT_SSL_NO_VERIFY") ? 0 : 1;
        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, curl_ssl_verify);
+#if LIBCURL_VERSION_NUM >= 0x070907
        curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
+#endif

        base = url;

        if (pull(commit_id))
                return 1;

+#if LIBCURL_VERSION_NUM >= 0x070704
        curl_global_cleanup();
+#endif
        return 0;
 }

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to