Thread (18 messages) flat view 18 messages, 3 authors, 2016-06-15
STALE3752d

[PATCH v4 13/10] test: remote-helper: add test for force pushes

From: Richard Hansen <hidden>
Date: 2016-06-15 22:59:06
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Richard Hansen <redacted>
---
 t/t5801-remote-helpers.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
index be543c0..93a7d34 100755
--- a/t/t5801-remote-helpers.sh
+++ b/t/t5801-remote-helpers.sh
@@ -102,6 +102,19 @@ test_expect_success 'push delete branch' '
 	 rev-parse --verify refs/heads/new-name
 '
 
+test_expect_success 'force 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 &&
-- 
1.8.4.1.614.ga09cf56
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help