From 510fa6f5188d715050899eee221c739f1c0a8b12 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Tue, 12 Nov 2013 14:56:56 -0600 Subject: transport-helper: add 'force' to 'export' helpers Otherwise they cannot know when to force the push or not (other than hacks). Tests-by: Richard Hansen Documentation-by: Richard Hansen Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- t/t5801-remote-helpers.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 't/t5801-remote-helpers.sh') diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh index 613f69a254..c33cc25805 100755 --- a/t/t5801-remote-helpers.sh +++ b/t/t5801-remote-helpers.sh @@ -94,6 +94,19 @@ test_expect_failure 'push new branch with old:new refspec' ' compare_refs local HEAD server refs/heads/new-refspec ' +test_expect_success 'forced push' ' + (cd local && + git checkout -b force-test && + echo content >> file && + git commit -a -m eight && + git push origin force-test && + echo content >> file && + git commit -a --amend -m eight-modified && + git push --force origin force-test + ) && + compare_refs local refs/heads/force-test server refs/heads/force-test +' + test_expect_success 'cloning without refspec' ' GIT_REMOTE_TESTGIT_REFSPEC="" \ git clone "testgit::${PWD}/server" local2 2>error && -- cgit v1.2.3