[PATCH 3/8] push tests: add more testing for forced tag pushing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Improve the tests added in dbfeddb12e ("push: require force for refs
under refs/tags/", 2012-11-29) to assert that the same behavior
applies various forms other refspecs, and that "+" in a refspec will
override the "--no-force" option (but not the other way around).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
---
 t/t5516-fetch-push.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 15c8d5a734..c9a2011915 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -981,7 +981,17 @@ test_expect_success 'push requires --force to update lightweight tag' '
 		git push --force ../child2 Tag &&
 		git tag -f Tag HEAD~ &&
 		test_must_fail git push ../child2 Tag &&
-		git push --force ../child2 Tag
+		git push --force ../child2 Tag &&
+		git tag -f Tag &&
+		test_must_fail git push ../child2 "refs/tags/*:refs/tags/*" &&
+		git push --force ../child2 "refs/tags/*:refs/tags/*" &&
+		git tag -f Tag HEAD~ &&
+		git push ../child2 "+refs/tags/*:refs/tags/*" &&
+		git tag -f Tag &&
+		git push --no-force ../child2 "+refs/tags/*:refs/tags/*" &&
+		git tag -f Tag HEAD~ &&
+		test_must_fail git push ../child2 tag Tag &&
+		git push --force ../child2 tag Tag
 	)
 '
 
-- 
2.17.0.290.gded63e768a




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux