diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-08-24 01:41:14 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-24 09:54:00 -0700 |
commit | 655e8d9c92121b1d84fda91b73c4a0daa638cbf8 (patch) | |
tree | 689f9e6c69b512e7391c21aa0f853bc04d9f8b2a /t/t5400-send-pack.sh | |
parent | 2b64fc894dada0916558fd0bfd19c50631f978cb (diff) | |
download | git-655e8d9c92121b1d84fda91b73c4a0daa638cbf8.tar.gz |
do not pass "git -c foo=bar" params to transport helpers
Like $GIT_CONFIG, $GIT_CONFIG_PARAMETERS needs to be suppressed by
"git push" and its cousins when running local transport helpers to
imitate remote transport well.
Noticed-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5400-send-pack.sh')
-rwxr-xr-x | t/t5400-send-pack.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index c718253673..5bcf0b867a 100755 --- a/t/t5400-send-pack.sh +++ b/t/t5400-send-pack.sh @@ -94,6 +94,29 @@ test_expect_success 'refuse deleting push with denyDeletes' ' test_must_fail git send-pack ./victim :extra master ' +test_expect_success 'cannot override denyDeletes with git -c send-pack' ' + ( + cd victim && + test_might_fail git branch -D extra && + git config receive.denyDeletes true && + git branch extra master + ) && + test_must_fail git -c receive.denyDeletes=false \ + send-pack ./victim :extra master +' + +test_expect_success 'override denyDeletes with git -c receive-pack' ' + ( + cd victim && + test_might_fail git branch -D extra && + git config receive.denyDeletes true && + git branch extra master + ) && + git send-pack \ + --receive-pack="git -c receive.denyDeletes=false receive-pack" \ + ./victim :extra master +' + test_expect_success 'denyNonFastforwards trumps --force' ' ( cd victim && |