summaryrefslogtreecommitdiff
path: root/t/t5400-send-pack.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-08-24 06:41:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-24 16:54:00 (GMT)
commit655e8d9c92121b1d84fda91b73c4a0daa638cbf8 (patch)
tree689f9e6c69b512e7391c21aa0f853bc04d9f8b2a /t/t5400-send-pack.sh
parent2b64fc894dada0916558fd0bfd19c50631f978cb (diff)
downloadgit-655e8d9c92121b1d84fda91b73c4a0daa638cbf8.zip
git-655e8d9c92121b1d84fda91b73c4a0daa638cbf8.tar.gz
git-655e8d9c92121b1d84fda91b73c4a0daa638cbf8.tar.bz2
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-xt/t5400-send-pack.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index c718253..5bcf0b8 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 &&