diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-02-09 09:20:25 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-02-10 13:47:24 -0800 |
commit | 486c8e8c6a42a1e0537eedb2b5ab9e74eb58d5f7 (patch) | |
tree | 99362f27658fccfc278ecec0ff2e02c8ee98a810 /t/t5100 | |
parent | connect: Add the envvar GIT_SSH_VARIANT and ssh.variant config (diff) | |
download | tgif-486c8e8c6a42a1e0537eedb2b5ab9e74eb58d5f7.tar.xz |
connect.c: stop conflating ssh command names and overrides
dd33e07766 ("connect: Add the envvar GIT_SSH_VARIANT and ssh.variant
config", 2017-02-01) attempted to add support for configuration and
environment variable to override the different handling of
port_option and needs_batch settings suitable for variants of the
ssh implementation that was autodetected by looking at the ssh
command name. Because it piggybacked on the code that turns command
name to specific override (e.g. "plink.exe" and "plink" means
port_option needs to be set to 'P' instead of the default 'p'), yet
it defined a separate namespace for these overrides (e.g. "putty"
can be usable to signal that port_option needs to be 'P'), however,
it made the auto-detection based on the command name less robust
(e.g. the code now accepts "putty" as a SSH command name and applies
the same override).
Separate the code that interprets the override that was read from
the configuration & environment from the original code that handles
the command names, as they are in separate namespaces, to fix this
confusion.
This incidentally also makes it easier for future enhancement of the
override syntax (e.g. "port_option=p,needs_batch=1" may want to be
accepted as a more explicit syntax) without affecting the code for
auto-detection based on the command name.
While at it, update the return type of the handle_ssh_variant()
helper function to void; the caller does not use it, and the
function does not return any meaningful value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5100')
0 files changed, 0 insertions, 0 deletions