From 9fae805e0421aa4caf1e0a9052f8701a88d7bd0d Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Fri, 25 May 2012 07:57:44 -0700 Subject: [PATCH] Pass http_proxy as -c http.proxy on Mac OS X The system libcurl library seems to ignore http_proxy on Mac OS X systems. Copy the http_proxy environment variable (if set) as `git -c http.proxy` whenever running a Git command. Change-Id: I0ab29336897178f70b85092601f9fcc306dd17e1 --- git_command.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git_command.py b/git_command.py index aecda0e4..ea0053e3 100644 --- a/git_command.py +++ b/git_command.py @@ -155,6 +155,8 @@ class GitCommand(object): gitdir = project.gitdir command = [GIT] + if 'http_proxy' in env and 'darwin' == sys.platform: + command.extend(['-c', 'http.proxy=' + env['http_proxy']]) if bare: if gitdir: _setenv(env, GIT_DIR, gitdir)