summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorSam Vilain <sam.vilain@catalyst.net.nz>2007-12-04 10:48:54 +1300
committerJunio C Hamano <gitster@pobox.com>2007-12-03 23:43:07 -0800
commit14c98218845ad2acbd42b8d913503ff6fb3fd2ac (patch)
tree80727a8ed62317aa7602f5cbcc117e7d3a3de211 /transport.c
parent9c5665aa3c938b0e085ca34a8126110edcffa217 (diff)
downloadgit-14c98218845ad2acbd42b8d913503ff6fb3fd2ac.tar.gz
Add remote.<name>.proxy
As well as allowing a default http.proxy option, allow it to be set per-remote. Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index 50db9807d0..3eb93b4875 100644
--- a/transport.c
+++ b/transport.c
@@ -470,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) {