]> git.ipfire.org Git - thirdparty/git.git/blame - t/t5507-remote-environment.sh
Merge branch 'jt/reftable-geometric-compaction'
[thirdparty/git.git] / t / t5507-remote-environment.sh
CommitLineData
aab40438
JK
1#!/bin/sh
2
3test_description='check environment showed to remote side of transports'
1fdd31cf
ÆAB
4
5TEST_PASSES_SANITIZE_LEAK=true
aab40438
JK
6. ./test-lib.sh
7
8test_expect_success 'set up "remote" push situation' '
9 test_commit one &&
10 git config push.default current &&
11 git init remote
12'
13
14test_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
24test_expect_success 'confirm default push fails' '
25 test_must_fail git push remote
26'
27
28test_expect_success 'config does not travel over same-machine push' '
29 test_must_fail git -c receive.denyCurrentBranch=false push remote
30'
31
32test_expect_success 'config does not travel over ssh push' '
33 test_must_fail git -c receive.denyCurrentBranch=false push host:remote
34'
35
36test_done