summaryrefslogtreecommitdiff
path: root/t/t5801-remote-helpers.sh
diff options
context:
space:
mode:
authorLibravatar Felipe Contreras <felipe.contreras@gmail.com>2013-11-12 14:56:56 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-11-12 13:34:32 -0800
commit510fa6f5188d715050899eee221c739f1c0a8b12 (patch)
tree8c0e297298060f5ae0e1d0b96f35b6fcc89e6529 /t/t5801-remote-helpers.sh
parenttransport-helper: don't update refs in dry-run (diff)
downloadtgif-510fa6f5188d715050899eee221c739f1c0a8b12.tar.xz
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 <rhansen@bbn.com> Documentation-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5801-remote-helpers.sh')
-rwxr-xr-xt/t5801-remote-helpers.sh13
1 files changed, 13 insertions, 0 deletions
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 &&