From acd2a45b83e50c0f33b01ee74df241f1adfdff39 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 11 Feb 2009 02:28:03 -0800 Subject: 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 --- t/t5517-push-mirror.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 't/t5517-push-mirror.sh') diff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh index ea49dedbf..e2ad26050 100755 --- a/t/t5517-push-mirror.sh +++ b/t/t5517-push-mirror.sh @@ -19,7 +19,8 @@ mk_repo_pair () { mkdir mirror && ( cd mirror && - git init + git init && + git config receive.denyCurrentBranch warn ) && mkdir master && ( -- cgit v1.2.1