From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Carlos Rica <jasampler@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: [PATCH] t7004: test that "git-tag -u" implies "-s"
Date: Mon, 10 Dec 2007 23:24:36 -0500 [thread overview]
Message-ID: <20071211042436.GA23805@coredump.intra.peff.net> (raw)
In-Reply-To: <alpine.LFD.0.9999.0712101950110.28293@woody.linux-foundation.org>
This was lost in the C conversion, but recently fixed by
Linus.
Signed-off-by: Jeff King <peff@peff.net>
---
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
next prev parent reply other threads:[~2007-12-11 4:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-11 4:08 "git tag -u keyname" broken Linus Torvalds
2007-12-11 4:24 ` Jeff King [this message]
2007-12-11 4:38 ` [PATCH] t7004: test that "git-tag -u" implies "-s" Junio C Hamano
2007-12-11 5:22 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071211042436.GA23805@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jasampler@gmail.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).