[PATCH 2/3] t7004: ensure recursive tag behavior is working

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

 



Add tests to ensure that recursive tags are disallowed unless the
"--allow-recursive-tag" option is provided.

Signed-off-by: Denton Liu <liu.denton@xxxxxxxxx>
---
 t/t7004-tag.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 7a7c0ccee9..5297da952d 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1700,6 +1700,14 @@ test_expect_success '--points-at finds annotated tags of tags' '
 	test_cmp expect actual
 '
 
+test_expect_success 'recursive tagging should fail without --allow-recursive-tag' '
+	test_must_fail git tag -m recursive recursive annotated-v4.0
+'
+
+test_expect_success 'recursive tagging should pass with --allow-recursive-tag' '
+	git tag --allow-recursive-tag -m recursive recursive annotated-v4.0
+'
+
 test_expect_success 'multiple --points-at are OR-ed together' '
 	cat >expect <<-\EOF &&
 	v2.0
-- 
2.21.0.512.g57bf1b23e1




[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