Merge tag 'l10n-2.10.0-rnd2' of git://github.com/git-l10n/git-po
[git/debian.git] / t / t5602-clone-remote-exec.sh
blobcbcceab9d56b591ee851374c9030a23a4c65a462
1 #!/bin/sh
3 test_description=clone
5 . ./test-lib.sh
7 test_expect_success setup '
8 echo "#!/bin/sh" > not_ssh &&
9 echo "echo \"\$*\" > not_ssh_output" >> not_ssh &&
10 echo "exit 1" >> not_ssh &&
11 chmod +x not_ssh
14 test_expect_success 'clone calls git upload-pack unqualified with no -u option' '
15 test_must_fail env GIT_SSH=./not_ssh git clone localhost:/path/to/repo junk &&
16 echo "localhost git-upload-pack '\''/path/to/repo'\''" >expected &&
17 test_cmp expected not_ssh_output
20 test_expect_success 'clone calls specified git upload-pack with -u option' '
21 test_must_fail env GIT_SSH=./not_ssh \
22 git clone -u ./something/bin/git-upload-pack localhost:/path/to/repo junk &&
23 echo "localhost ./something/bin/git-upload-pack '\''/path/to/repo'\''" >expected &&
24 test_cmp expected not_ssh_output
27 test_done