From 3d95d92b9a75825b2d9c9bd770d85471b18597f8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 31 Jan 2009 17:34:05 -0800 Subject: receive-pack: explain what to do when push updates the current branch This makes "git push" issue a more detailed instruction when a user pushes into the current branch of a non-bare repository without having an explicit configuration set to receive.denycurrentbranch. In such a case, it will also tell the user that the default will change to refusal in a future version of git. Signed-off-by: Junio C Hamano --- t/t5516-fetch-push.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 't/t5516-fetch-push.sh') diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 4426df9226..89649e7a9b 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -492,7 +492,7 @@ test_expect_success 'warn on push to HEAD of non-bare repository' ' git checkout master && git config receive.denyCurrentBranch warn) && git push testrepo master 2>stderr && - grep "warning.*this may cause confusion" stderr + grep "warning: updating the current branch" stderr ' test_expect_success 'deny push to HEAD of non-bare repository' ' @@ -510,7 +510,7 @@ test_expect_success 'allow push to HEAD of bare repository (bare)' ' git config receive.denyCurrentBranch true && git config core.bare true) && git push testrepo master 2>stderr && - ! grep "warning.*this may cause confusion" stderr + ! grep "warning: updating the current branch" stderr ' test_expect_success 'allow push to HEAD of non-bare repository (config)' ' @@ -520,7 +520,7 @@ test_expect_success 'allow push to HEAD of non-bare repository (config)' ' git config receive.denyCurrentBranch false ) && git push testrepo master 2>stderr && - ! grep "warning.*this may cause confusion" stderr + ! grep "warning: updating the current branch" stderr ' test_expect_success 'fetch with branches' ' -- cgit v1.2.3