Merge branch 'ds/commit-graph-incremental'
[gitweb.git] / t / t7004-tag.sh
index 6aeeb279a0a03614151a37f1bed8f22f4af0c4f5..80eb13d94e2a27d160424c9919ee0052c8c773c0 100755 (executable)
@@ -932,6 +932,27 @@ test_expect_success GPG \
        test_cmp expect actual
 '
 
+get_tag_header gpgsign-enabled $commit commit $time >expect
+echo "A message" >>expect
+echo '-----BEGIN PGP SIGNATURE-----' >>expect
+test_expect_success GPG \
+       'git tag configured tag.gpgsign enables GPG sign' \
+       'test_config tag.gpgsign true &&
+       git tag -m "A message" gpgsign-enabled &&
+       get_tag_msg gpgsign-enabled>actual &&
+       test_cmp expect actual
+'
+
+get_tag_header no-sign $commit commit $time >expect
+echo "A message" >>expect
+test_expect_success GPG \
+       'git tag --no-sign configured tag.gpgsign skip GPG sign' \
+       'test_config tag.gpgsign true &&
+       git tag -a --no-sign -m "A message" no-sign &&
+       get_tag_msg no-sign>actual &&
+       test_cmp expect actual
+'
+
 test_expect_success GPG \
        'trying to create a signed tag with non-existing -F file should fail' '
        ! test -f nonexistingfile &&