Welcome to mirror list, hosted at ThFree Co, Russian Federation.

t5507-remote-environment.sh « t - git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c6a6957c5001e9480cbd26ccba5fd26c54126ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

test_description='check environment showed to remote side of transports'

TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh

test_expect_success 'set up "remote" push situation' '
	test_commit one &&
	git config push.default current &&
	git init remote
'

test_expect_success 'set up fake ssh' '
	GIT_SSH_COMMAND="f() {
		cd \"\$TRASH_DIRECTORY\" &&
		eval \"\$2\"
	}; f" &&
	export GIT_SSH_COMMAND &&
	export TRASH_DIRECTORY
'

# due to receive.denyCurrentBranch=true
test_expect_success 'confirm default push fails' '
	test_must_fail git push remote
'

test_expect_success 'config does not travel over same-machine push' '
	test_must_fail git -c receive.denyCurrentBranch=false push remote
'

test_expect_success 'config does not travel over ssh push' '
	test_must_fail git -c receive.denyCurrentBranch=false push host:remote
'

test_done