Git fork
at reftables-rust 35 lines 818 B view raw
1#!/bin/sh 2 3test_description='check environment showed to remote side of transports' 4 5. ./test-lib.sh 6 7test_expect_success 'set up "remote" push situation' ' 8 test_commit one && 9 git config push.default current && 10 git init remote 11' 12 13test_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 23test_expect_success 'confirm default push fails' ' 24 test_must_fail git push remote 25' 26 27test_expect_success 'config does not travel over same-machine push' ' 28 test_must_fail git -c receive.denyCurrentBranch=false push remote 29' 30 31test_expect_success 'config does not travel over ssh push' ' 32 test_must_fail git -c receive.denyCurrentBranch=false push host:remote 33' 34 35test_done