1 Star 0 Fork 0

小笼包/git

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
t5507-remote-environment.sh 817 Bytes
Copy Edit Raw Blame History
Jeff King authored 2015-09-05 06:40 +08:00 . git_connect: clear GIT_* environment for ssh
#!/bin/sh
test_description='check environment showed to remote side of transports'
. ./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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiaobaola/git.git
git@gitee.com:xiaobaola/git.git
xiaobaola
git
git
main

Search