mirror of
https://github.com/git/git
synced 2024-10-30 04:01:21 +00:00
1fdd31cf52
Fix a memory leak that's been with us since this code was introduced in [1]. Later in [2] we started using FLEX_ALLOC_MEM() to allocate the "struct command *". 1.575f497456
(Add first cut at "git-receive-pack", 2005-06-29) 2.eb1af2df0b
(git-receive-pack: start parsing ref update commands, 2005-06-29) Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
36 lines
849 B
Bash
Executable file
36 lines
849 B
Bash
Executable file
#!/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
|