Re: [PATCH v2] Add the tag.gpgsign option to sign all created tags
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 21, 2016, 22:06 UTC
- Message-ID
- <xmqqwpovjxjk.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <xmqqvb4fliq6.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 11 quoted lines
>>> If you are forcing users to always leave a message and then further >>> forcing users to always sign with the single new configuration, i.e. >>> >>> $ git tag v1.0 >>> ... opens the editor to ask for a message ... >>> ... then makes the user sign with GPG ... >> >> I'm not forcing this type of user to enable global configuration, that will be >> annoying for them of course. > > Good.
Eh, it seems that your test actually expects this kind of interaction, though.
This piece from your PATCH v4:
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index cf3469b..7791d00 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -775,6 +775,39 @@ test_expect_success GPG '-s implies annotated tag' '
test_cmp expect actual
' +get_tag_header config-implied-annotate $commit commit $time >expect
+./fakeeditor >>expect
+echo '-----BEGIN PGP SIGNATURE-----' >>expect
+test_expect_success GPG \
+ 'git tag -s implied if configured with tag.gpgsign' \
+ 'test_config tag.gpgsign true &&
+ GIT_EDITOR=./fakeeditor git tag config-implied-annotate &&
+ get_tag_msg config-implied-annotate >actual &&
+ test_cmp expect actual
+'
+wants to see that "git tag config-implied-annotate" (which looks exactly like "git tag v1.0" we discussed above) runs the fakeeditor and makes a signed tag.