diff options
author | Jonathan Nieder <jrn@google.com> | 2017-10-19 14:23:10 -0700 |
---|---|---|
committer | Jonathan Nieder <jrn@google.com> | 2017-10-19 14:39:26 -0700 |
commit | c00d28b767240ef17a0402a7d55a7a6197ce2815 (patch) | |
tree | 58ca90c82590183ea9cd5f21c116eb8927ab7e44 /git_command.py | |
parent | 788e9626ccefa2e40aab58b67a1487e2a26b8225 (diff) | |
download | git-repo-c00d28b767240ef17a0402a7d55a7a6197ce2815.tar.gz |
Set GIT_SSH_VARIANT when setting GIT_SSH
Make it explicit that the ssh wrapper we use for control master
support accepts OpenSSH-compatible command line arguments instead of
asking Git to guess.
The GIT_SSH_VARIANT setting was introduced in Git v2.13.0-rc0~3^2~2
(2017-02-01) as a more reliable detection method than relying on the
ssh command name. Fortunately the default variant was 'ssh' (i.e.,
OpenSSH-compatible) so this wasn't initially required.
Now Git wants to start using more OpenSSH features
(-o SendEnv=GIT_PROTOCOL), and in order to do so its ssh variant
detection will need to be tweaked. Set GIT_SSH_VARIANT explicitly
so this helper can continue to work regardless of how Git modifies
its autodetection.
Reported-by: William Yan <wyan@google.com>
Change-Id: I6bf2c53b4eb5303a429eae6cb68e0a5ccce89064
Diffstat (limited to 'git_command.py')
-rw-r--r-- | git_command.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git_command.py b/git_command.py index dfa6a924..b1e9e172 100644 --- a/git_command.py +++ b/git_command.py | |||
@@ -152,6 +152,7 @@ class GitCommand(object): | |||
152 | if ssh_proxy: | 152 | if ssh_proxy: |
153 | _setenv(env, 'REPO_SSH_SOCK', ssh_sock()) | 153 | _setenv(env, 'REPO_SSH_SOCK', ssh_sock()) |
154 | _setenv(env, 'GIT_SSH', _ssh_proxy()) | 154 | _setenv(env, 'GIT_SSH', _ssh_proxy()) |
155 | _setenv(env, 'GIT_SSH_VARIANT', 'ssh') | ||
155 | if 'http_proxy' in env and 'darwin' == sys.platform: | 156 | if 'http_proxy' in env and 'darwin' == sys.platform: |
156 | s = "'http.proxy=%s'" % (env['http_proxy'],) | 157 | s = "'http.proxy=%s'" % (env['http_proxy'],) |
157 | p = env.get('GIT_CONFIG_PARAMETERS') | 158 | p = env.get('GIT_CONFIG_PARAMETERS') |