summaryrefslogtreecommitdiffstats
path: root/git_command.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2012-05-25 07:57:44 -0700
committerShawn O. Pearce <sop@google.com>2012-05-25 08:21:37 -0700
commit9fae805e0421aa4caf1e0a9052f8701a88d7bd0d (patch)
treefe1b867c58618ee8a25b833f18d2f22a189499ee /git_command.py
parent6a927c5d1990a9391242baa00c5ac71490c50c28 (diff)
downloadgit-repo-9fae805e0421aa4caf1e0a9052f8701a88d7bd0d.tar.gz
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
Diffstat (limited to 'git_command.py')
-rw-r--r--git_command.py2
1 files changed, 2 insertions, 0 deletions
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):
155 gitdir = project.gitdir 155 gitdir = project.gitdir
156 156
157 command = [GIT] 157 command = [GIT]
158 if 'http_proxy' in env and 'darwin' == sys.platform:
159 command.extend(['-c', 'http.proxy=' + env['http_proxy']])
158 if bare: 160 if bare:
159 if gitdir: 161 if gitdir:
160 _setenv(env, GIT_DIR, gitdir) 162 _setenv(env, GIT_DIR, gitdir)