Skip to content
  • Brandon Williams's avatar
    ssh: introduce a 'simple' ssh variant · 94b8ae5a
    Brandon Williams authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    When using the 'ssh' transport, the '-o' option is used to specify an
    environment variable which should be set on the remote end.  This allows
    git to send additional information when contacting the server,
    requesting the use of a different protocol version via the
    'GIT_PROTOCOL' environment variable like so: "-o SendEnv=GIT_PROTOCOL".
    
    Unfortunately not all ssh variants support the sending of environment
    variables to the remote end.  To account for this, only use the '-o'
    option for ssh variants which are OpenSSH compliant.  This is done by
    checking that the basename of the ssh command is 'ssh' or the ssh
    variant is overridden to be 'ssh' (via the ssh.variant config).
    
    Other options like '-p' and '-P', which are used to specify a specific
    port to use, or '-4' and '-6', which are used to indicate that IPV4 or
    IPV6 addresses should be used, may also not be supported by all ssh
    variants.
    
    Currently if an ssh command's basename wasn't 'plink' or
    'tortoiseplink' git assumes that the command is an OpenSSH variant.
    Since user configured ssh commands may not be OpenSSH compliant, tighten
    this constraint and assume a variant of 'simple' if the basename of the
    command doesn't match the variants known to git.  The new ssh variant
    'simple' will only have the host and command to execute ([username@]host
    command) passed as parameters to the ssh command.
    
    Update the Documentation to better reflect the command-line options sent
    to ssh commands based on their variant.
    
    Reported-by: default avatarJeffrey Yasskin <jyasskin@google.com>
    Signed-off-by: default avatarBrandon Williams <bmwill@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    94b8ae5a