]>
Commit | Line | Data |
---|---|---|
837c8767 SH |
1 | #!/bin/sh |
2 | ||
3 | test_description=clone | |
4 | ||
e2efbd23 | 5 | TEST_PASSES_SANITIZE_LEAK=true |
837c8767 SH |
6 | . ./test-lib.sh |
7 | ||
8 | test_expect_success setup ' | |
771cf1da EN |
9 | echo "#!/bin/sh" > not_ssh && |
10 | echo "echo \"\$*\" > not_ssh_output" >> not_ssh && | |
11 | echo "exit 1" >> not_ssh && | |
837c8767 SH |
12 | chmod +x not_ssh |
13 | ' | |
14 | ||
3604e7c5 | 15 | test_expect_success 'clone calls git upload-pack unqualified with no -u option' ' |
512477b1 | 16 | test_must_fail env GIT_SSH=./not_ssh git clone localhost:/path/to/repo junk && |
771cf1da | 17 | echo "localhost git-upload-pack '\''/path/to/repo'\''" >expected && |
837c8767 SH |
18 | test_cmp expected not_ssh_output |
19 | ' | |
20 | ||
3604e7c5 | 21 | test_expect_success 'clone calls specified git upload-pack with -u option' ' |
512477b1 DT |
22 | test_must_fail env GIT_SSH=./not_ssh \ |
23 | git clone -u ./something/bin/git-upload-pack localhost:/path/to/repo junk && | |
771cf1da | 24 | echo "localhost ./something/bin/git-upload-pack '\''/path/to/repo'\''" >expected && |
837c8767 SH |
25 | test_cmp expected not_ssh_output |
26 | ' | |
27 | ||
28 | test_done |