summaryrefslogtreecommitdiff
path: root/t/t5701-clone-local.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-02-11 10:28:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-07-29 17:15:00 (GMT)
commitacd2a45b83e50c0f33b01ee74df241f1adfdff39 (patch)
tree2dd1dd6c6c0630ebb43b88e1cbd8256ebbd83659 /t/t5701-clone-local.sh
parent6641575963388b61f408f177d91cdacad25d2e26 (diff)
downloadgit-acd2a45b83e50c0f33b01ee74df241f1adfdff39.zip
git-acd2a45b83e50c0f33b01ee74df241f1adfdff39.tar.gz
git-acd2a45b83e50c0f33b01ee74df241f1adfdff39.tar.bz2
Refuse updating the current branch in a non-bare repository via push
This makes git-push refuse pushing into a non-bare repository to update the current branch by default. To help people who are used to be able to do this (and later "reset --hard" it in some other way), an error message is issued when this refusal is triggered, instructing how to resurrect the old behaviour. Hosting sites that do not give the users direct access to customize their repositories (e.g. repo.or.cz, gitorious, github etc.) may further want to explicitly set the configuration variable to "refuse" for their customers' repositories. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5701-clone-local.sh')
-rwxr-xr-xt/t5701-clone-local.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh
index 19b5c0d..8b4c356 100755
--- a/t/t5701-clone-local.sh
+++ b/t/t5701-clone-local.sh
@@ -119,7 +119,9 @@ test_expect_success 'bundle clone with nonexistent HEAD' '
test_expect_success 'clone empty repository' '
cd "$D" &&
mkdir empty &&
- (cd empty && git init) &&
+ (cd empty &&
+ git init &&
+ git config receive.denyCurrentBranch warn) &&
git clone empty empty-clone &&
test_tick &&
(cd empty-clone