[PATCH] t7004: test that "git-tag -u" implies "-s"

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

 



This was lost in the C conversion, but recently fixed by
Linus.

Signed-off-by: Jeff King <peff@xxxxxxxx>
---
On Mon, Dec 10, 2007 at 08:08:06PM -0800, Linus Torvalds wrote:

> It used to be that passing the signing ID with the -u parameter also 
> (obviously!) implied that you wanted to sign and annotate the tag, but 
> that logic got dropped. It also totally ignored the actual key ID that was 
> passed in.
> [...]
> This has gotten only very minimal testing. Somebody should double-check it 
> all, and adding a test would probably be great too.

Looks good to me, and here's a test. It was trivial to whip up, since I
wrote a test for almost the identical bug a few days ago (that one was
"-s implies -a").

 t/t7004-tag.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index c7130c4..5393d35 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -682,6 +682,14 @@ test_expect_success '-s implies annotated tag' '
 	get_tag_msg implied-annotate >actual &&
 	git diff expect actual
 '
+get_tag_header implied-sign $commit commit $time >expect
+./fakeeditor >>expect
+echo '-----BEGIN PGP SIGNATURE-----' >>expect
+test_expect_success '-u implies signed tag' '
+	GIT_EDITOR=./fakeeditor git-tag -u CDDE430D implied-sign &&
+	get_tag_msg implied-sign >actual &&
+	git diff expect actual
+'
 
 test_expect_success \
 	'trying to create a signed tag with non-existing -F file should fail' '
-- 
1.5.3.7.2229.gd040e-dirty

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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