Merge branch 'jc/exclusion-doc'
[alt-git.git] / t / t5507-remote-environment.sh
blobe6149295b187429575aa6fe56e2e206900d30341
1 #!/bin/sh
3 test_description='check environment showed to remote side of transports'
4 . ./test-lib.sh
6 test_expect_success 'set up "remote" push situation' '
7 test_commit one &&
8 git config push.default current &&
9 git init remote
12 test_expect_success 'set up fake ssh' '
13 GIT_SSH_COMMAND="f() {
14 cd \"\$TRASH_DIRECTORY\" &&
15 eval \"\$2\"
16 }; f" &&
17 export GIT_SSH_COMMAND &&
18 export TRASH_DIRECTORY
21 # due to receive.denyCurrentBranch=true
22 test_expect_success 'confirm default push fails' '
23 test_must_fail git push remote
26 test_expect_success 'config does not travel over same-machine push' '
27 test_must_fail git -c receive.denyCurrentBranch=false push remote
30 test_expect_success 'config does not travel over ssh push' '
31 test_must_fail git -c receive.denyCurrentBranch=false push host:remote
34 test_done