git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 22 of 53 in “tag: add --points-at list option”
  1. tag: add --points-at list optionTom Grennan, Feb 5, 2012
  2. Junio C HamanoFeb 5, 2012
  3. Tom GrennanFeb 6, 2012
  4. Junio C HamanoFeb 6, 2012
  5. Tom GrennanFeb 6, 2012
  6. Jeff KingFeb 6, 2012
  7. Tom GrennanFeb 6, 2012
  8. Jeff KingFeb 6, 2012
  9. Jeff KingFeb 6, 2012
  10. Jeff KingFeb 6, 2012
  11. Jeff KingFeb 6, 2012
  12. 1/3 tag: fix output of "tag -n" when errors occurJeff King, Feb 6, 2012
  13. 2/3 tag: die when listing missing or corrupt objectsJeff King, Feb 6, 2012
  14. Junio C HamanoFeb 6, 2012
  15. Jeff KingFeb 6, 2012
  16. Junio C HamanoFeb 6, 2012
  17. Jeff KingFeb 6, 2012
  18. Junio C HamanoFeb 6, 2012
  19. Junio C HamanoFeb 6, 2012
  20. Jeff KingFeb 6, 2012
  21. Junio C HamanoFeb 6, 2012
  22. Jeff KingFeb 8, 2012
  23. Junio C HamanoFeb 9, 2012
  24. 3/3 tag: don't show non-tag contents with "-n"Jeff King, Feb 6, 2012
  25. [PATCHv2] tag: add --points-at list optionTom Grennan, Feb 7, 2012
  26. [PATCHv2] tag: add --points-at list optionTom Grennan, Feb 7, 2012
  27. Junio C HamanoFeb 7, 2012
  28. Tom GrennanFeb 7, 2012
  29. Jeff KingFeb 7, 2012
  30. Tom GrennanFeb 7, 2012
  31. Jeff KingFeb 7, 2012
  32. Tom GrennanFeb 7, 2012
  33. Jeff KingFeb 7, 2012
  34. Junio C HamanoFeb 7, 2012
  35. Jeff KingFeb 7, 2012
  36. Tom GrennanFeb 7, 2012
  37. Jeff KingFeb 8, 2012
  38. Tom GrennanFeb 8, 2012
  39. Jeff KingFeb 8, 2012
  40. [PATCHv3] tag: add --points-at list optionTom Grennan, Feb 8, 2012
  41. [PATCHv3] tag: add --points-at list optionTom Grennan, Feb 8, 2012
  42. Jeff KingFeb 8, 2012
  43. Tom GrennanFeb 8, 2012
  44. Jeff KingFeb 8, 2012
  45. [PATCHv4] tag: add --points-at list optionTom Grennan, Feb 8, 2012
  46. [PATCHv4] tag: add --points-at list optionTom Grennan, Feb 8, 2012
  47. Jeff KingFeb 8, 2012
  48. Tom GrennanFeb 8, 2012
  49. tag: add --points-at list optionTom Grennan, Feb 8, 2012
  50. tag: add --points-at list optionTom Grennan, Feb 8, 2012
  51. Jeff KingFeb 9, 2012
  52. Junio C HamanoFeb 9, 2012
  53. Tom GrennanFeb 8, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.