345
}
346
347
test_expect_success 'clone myhost:src uses ssh' '
348
- git clone myhost:src ssh-clone &&
348
+ GIT_TEST_PROTOCOL_VERSION=0 git clone myhost:src ssh-clone &&
349
expect_ssh myhost src
350
'
351
356
'
357
358
test_expect_success 'bracketed hostnames are still ssh' '
359
- git clone "[myhost:123]:src" ssh-bracket-clone &&
359
+ GIT_TEST_PROTOCOL_VERSION=0 git clone "[myhost:123]:src" ssh-bracket-clone &&
360
expect_ssh "-p 123" myhost src
361
'
362
363
test_expect_success 'OpenSSH variant passes -4' '
364
- git clone -4 "[myhost:123]:src" ssh-ipv4-clone &&
364
+ GIT_TEST_PROTOCOL_VERSION=0 git clone -4 "[myhost:123]:src" ssh-ipv4-clone &&
365
expect_ssh "-4 -p 123" myhost src
366
'
367
405
test_when_finished "rm -f \"\$TRASH_DIRECTORY/uplink\"" &&
406
GIT_SSH="$TRASH_DIRECTORY/uplink" &&
407
test_when_finished "GIT_SSH=\"\$TRASH_DIRECTORY/ssh\$X\"" &&
408
- git clone "[myhost:123]:src" ssh-bracket-clone-sshlike-uplink &&
408
+ GIT_TEST_PROTOCOL_VERSION=0 git clone "[myhost:123]:src" ssh-bracket-clone-sshlike-uplink &&
409
expect_ssh "-p 123" myhost src
410
'
411
444
445
test_expect_success 'GIT_SSH_VARIANT overrides plink detection' '
446
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" &&
447
- GIT_SSH_VARIANT=ssh \
448
- git clone "[myhost:123]:src" ssh-bracket-clone-variant-1 &&
447
+ GIT_TEST_PROTOCOL_VERSION=0 GIT_SSH_VARIANT=ssh \
448
+ git clone "[myhost:123]:src" ssh-bracket-clone-variant-1 &&
449
expect_ssh "-p 123" myhost src
450
'
451
452
test_expect_success 'ssh.variant overrides plink detection' '
453
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" &&
454
- git -c ssh.variant=ssh \
454
+ GIT_TEST_PROTOCOL_VERSION=0 git -c ssh.variant=ssh \
455
clone "[myhost:123]:src" ssh-bracket-clone-variant-2 &&
456
expect_ssh "-p 123" myhost src
457
'
482
# $3 path
483
test_clone_url () {
484
counter=$(($counter + 1))
485
- test_might_fail git clone "$1" tmp$counter &&
485
+ test_might_fail env GIT_TEST_PROTOCOL_VERSION=0 git clone "$1" tmp$counter &&
486
shift &&
487
expect_ssh "$@"
488
}