aboutsummaryrefslogtreecommitdiff
path: root/t/t5601-clone.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2017-11-20 13:30:30 -0800
committerJunio C Hamano <gitster@pobox.com>2017-11-21 14:01:03 +0900
commita3f5b66fac3b5f3b2c352c8086dbc3d476f9e3d4 (patch)
tree5fbbe1a1105af18ba2b6e27188fee2a40234bb2b /t/t5601-clone.sh
parent0da0e49ba12225684b75e86a4c9344ad121652cb (diff)
downloadgit-a3f5b66fac3b5f3b2c352c8086dbc3d476f9e3d4.tar.gz
git-a3f5b66fac3b5f3b2c352c8086dbc3d476f9e3d4.tar.xz
ssh: 'simple' variant does not support -4/-6
If the user passes -4/--ipv4 or -6/--ipv6 to "git fetch" or "git push" and the ssh command configured with GIT_SSH does not support such a setting, error out instead of ignoring the option and continuing. 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-xt/t5601-clone.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index d96b8e737..9ae1606ee 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -364,9 +364,10 @@ test_expect_success 'OpenSSH variant passes -4' '
expect_ssh "-4 -p 123" myhost src
'
-test_expect_success 'variant can be overriden' '
- git -c ssh.variant=simple clone -4 "[myhost:123]:src" ssh-simple-clone &&
- expect_ssh myhost src
+test_expect_success 'variant can be overridden' '
+ copy_ssh_wrapper_as "$TRASH_DIRECTORY/putty" &&
+ git -c ssh.variant=putty clone -4 "[myhost:123]:src" ssh-putty-clone &&
+ expect_ssh "-4 -P 123" myhost src
'
test_expect_success 'variant=auto picks based on basename' '
@@ -375,10 +376,9 @@ test_expect_success 'variant=auto picks based on basename' '
expect_ssh "-4 -P 123" myhost src
'
-test_expect_success 'simple is treated as simple' '
+test_expect_success 'simple does not support -4/-6' '
copy_ssh_wrapper_as "$TRASH_DIRECTORY/simple" &&
- git clone -4 "[myhost:123]:src" ssh-bracket-clone-simple &&
- expect_ssh myhost src
+ test_must_fail git clone -4 "[myhost:123]:src" ssh-bracket-clone-simple
'
test_expect_success 'uplink is treated as simple' '