diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2017-11-21 00:31:01 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-21 08:01:03 +0300 |
commit | 3fa5e0d07a979dfd1a1095a9dda4904c62189e00 (patch) | |
tree | c76b4807066e4268f1ff0ced5e2f9deb8b76b73a /t/t5601-clone.sh | |
parent | a3f5b66fac3b5f3b2c352c8086dbc3d476f9e3d4 (diff) |
ssh: 'simple' variant does not support --port
When trying to connect to an ssh:// URL with port explicitly specified
and the ssh command configured with GIT_SSH does not support such a
setting, it is less confusing to error out than to silently suppress
the port setting and continue.
This requires updating the GIT_SSH setting in t5603-clone-dirname.sh.
That test is about the directory name produced when cloning various
URLs. It uses an ssh wrapper that ignores all its arguments but does
not declare that it supports a port argument; update it to set
GIT_SSH_VARIANT=ssh to do so. (Real-life ssh wrappers that pass a
port argument to OpenSSH would also support -G and would not require
such an update.)
Reported-by: William Yan <wyan@google.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5601-clone.sh')
-rwxr-xr-x | t/t5601-clone.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index 9ae1606ee5..66784fc8ff 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@ -378,12 +378,18 @@ test_expect_success 'variant=auto picks based on basename' ' test_expect_success 'simple does not support -4/-6' ' copy_ssh_wrapper_as "$TRASH_DIRECTORY/simple" && - test_must_fail git clone -4 "[myhost:123]:src" ssh-bracket-clone-simple + test_must_fail git clone -4 "myhost:src" ssh-4-clone-simple +' + +test_expect_success 'simple does not support port' ' + copy_ssh_wrapper_as "$TRASH_DIRECTORY/simple" && + test_must_fail git clone "[myhost:123]:src" ssh-bracket-clone-simple ' test_expect_success 'uplink is treated as simple' ' copy_ssh_wrapper_as "$TRASH_DIRECTORY/uplink" && - git clone "[myhost:123]:src" ssh-bracket-clone-uplink && + test_must_fail git clone "[myhost:123]:src" ssh-bracket-clone-uplink && + git clone "myhost:src" ssh-clone-uplink && expect_ssh myhost src ' |