]>
Commit | Line | Data |
---|---|---|
aab40438 JK |
1 | #!/bin/sh |
2 | ||
3 | test_description='check environment showed to remote side of transports' | |
1fdd31cf ÆAB |
4 | |
5 | TEST_PASSES_SANITIZE_LEAK=true | |
aab40438 JK |
6 | . ./test-lib.sh |
7 | ||
8 | test_expect_success 'set up "remote" push situation' ' | |
9 | test_commit one && | |
10 | git config push.default current && | |
11 | git init remote | |
12 | ' | |
13 | ||
14 | test_expect_success 'set up fake ssh' ' | |
15 | GIT_SSH_COMMAND="f() { | |
16 | cd \"\$TRASH_DIRECTORY\" && | |
17 | eval \"\$2\" | |
18 | }; f" && | |
19 | export GIT_SSH_COMMAND && | |
20 | export TRASH_DIRECTORY | |
21 | ' | |
22 | ||
23 | # due to receive.denyCurrentBranch=true | |
24 | test_expect_success 'confirm default push fails' ' | |
25 | test_must_fail git push remote | |
26 | ' | |
27 | ||
28 | test_expect_success 'config does not travel over same-machine push' ' | |
29 | test_must_fail git -c receive.denyCurrentBranch=false push remote | |
30 | ' | |
31 | ||
32 | test_expect_success 'config does not travel over ssh push' ' | |
33 | test_must_fail git -c receive.denyCurrentBranch=false push host:remote | |
34 | ' | |
35 | ||
36 | test_done |