From c00d28b767240ef17a0402a7d55a7a6197ce2815 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 19 Oct 2017 14:23:10 -0700 Subject: [PATCH] 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 Change-Id: I6bf2c53b4eb5303a429eae6cb68e0a5ccce89064 --- git_command.py | 1 + 1 file changed, 1 insertion(+) 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): if ssh_proxy: _setenv(env, 'REPO_SSH_SOCK', ssh_sock()) _setenv(env, 'GIT_SSH', _ssh_proxy()) + _setenv(env, 'GIT_SSH_VARIANT', 'ssh') if 'http_proxy' in env and 'darwin' == sys.platform: s = "'http.proxy=%s'" % (env['http_proxy'],) p = env.get('GIT_CONFIG_PARAMETERS')