git-cvsserver runs hooks/post-receive
[gitweb.git] / transport.c
index 8d9bdbe8dedd1c050e017d509cbc9e87d98a6e88..3eb93b4875ed0e4884088565a0faa45cc3d287e3 100644 (file)
@@ -348,6 +348,7 @@ static int rsync_transport_push(struct transport *transport,
 
 /* Generic functions for using commit walkers */
 
+#ifndef NO_CURL /* http fetch is the only user */
 static int fetch_objs_via_walker(struct transport *transport,
                                 int nr_objs, struct ref **to_fetch)
 {
@@ -374,6 +375,7 @@ static int fetch_objs_via_walker(struct transport *transport,
        free(dest);
        return 0;
 }
+#endif /* NO_CURL */
 
 static int disconnect_walker(struct transport *transport)
 {
@@ -468,6 +470,10 @@ static struct ref *get_refs_via_curl(struct transport *transport)
        curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_buffer);
        curl_easy_setopt(slot->curl, CURLOPT_URL, refs_url);
        curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, NULL);
+       if (transport->remote->http_proxy)
+               curl_easy_setopt(slot->curl, CURLOPT_PROXY,
+                                transport->remote->http_proxy);
+
        if (start_active_slot(slot)) {
                run_active_slot(slot);
                if (results.curl_result != CURLE_OK) {