Re: [PATCH 2/3] tag: die when listing missing or corrupt objects
- From
Jeff King <peff@peff.net>
- Date
- Feb 8, 2012, 21:01 UTC
- Message-ID
- <20120208210156.GA9588@sigill.intra.peff.net>
- In-Reply-To
- <7vty337rug.fsf@alter.siamese.dyndns.org>
On Mon, Feb 06, 2012 at 10:13:27AM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> Jeff King <peff@peff.net> writes: > > > OK, that's easy enough to do. Should we show lightweight tags to commits > > for backwards compatibility (and just drop the parse_signature junk in > > that case)? The showing of blobs or trees is the really bad thing, I > > think. > > For now, dropping 3/3 and queuing this instead... > > --- > Subject: tag: do not show non-tag contents with "-n"
Since jk/maint-tag-show-fixes is still in pu, perhaps we can squash in this test from my 3/3:
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index e93ac73..0db0f6a 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -586,6 +586,19 @@ test_expect_success \ test_cmp expect actual ' +test_expect_success 'annotations for blobs are empty' ' + blob=$(git hash-object -w --stdin <<-\EOF + Blob paragraph 1. + + Blob paragraph 2. + EOF + ) && + git tag tag-blob $blob && + echo "tag-blob " >expect && + git tag -n1 -l tag-blob >actual && + test_cmp expect actual +' + # trying to verify annotated non-signed tags: test_expect_success GPG \ If we want to be more thorough, I can write up a more complete test battery making sure tags and commits are both shown, but blobs and trees are not. -Peff