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