test_must_fail git tag -v forged-tag
'
-test_expect_success 'verifying a proper tag with --format pass and format accordingly' '
- cat >expect <<-\EOF
+test_expect_success GPG 'verifying a proper tag with --format pass and format accordingly' '
+ cat >expect <<-\EOF &&
tagname : signed-tag
- EOF &&
+ EOF
git tag -v --format="tagname : %(tag)" "signed-tag" >actual &&
test_cmp expect actual
'
-test_expect_success 'verifying a forged tag with --format fail and format accordingly' '
- cat >expect <<-\EOF
- tagname : forged-tag
- EOF &&
+test_expect_success GPG 'verifying a forged tag with --format should fail silently' '
+ >expect &&
test_must_fail git tag -v --format="tagname : %(tag)" "forged-tag" >actual &&
test_cmp expect actual
'
test_must_fail git tag --contains tag-blob &&
test_must_fail git tag --no-contains tag-tree &&
test_must_fail git tag --no-contains tag-blob &&
- test_must_fail git tag --contains --no-contains
+ test_must_fail git tag --contains --no-contains &&
+ test_must_fail git tag --no-with HEAD &&
+ test_must_fail git tag --no-without HEAD
'
-for option in --contains --no-contains --merged --no-merged --points-at
+for option in --contains --with --no-contains --without --merged --no-merged --points-at
do
test_expect_success "mixing incompatible modes with $option is forbidden" "
test_must_fail git tag -d $option HEAD &&