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

[PATCH] Paper bag fix git-describe on packed tags

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 3, 2008, 23:21 UTC
Message-ID
<20080303232136.GA15312@spearce.org>

In 212945d ("Teach git-describe to verify annotated tag names") we tried to access a possibly unparsed tag structure. We must make sure it was parsed before we try to read its tag name.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 As 212945d is already in master this probably should be
 fast-tracked there.  Whoops.  :-)
 builtin-describe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-describe.c b/builtin-describe.c
index 2f1e7ba..d4204ee 100644
--- a/builtin-describe.c
+++ b/builtin-describe.c
@@ -156,7 +156,7 @@ static void display_name(struct commit_name *n)
 {
 	if (n->prio == 2 && !n->tag) {
 		n->tag = lookup_tag(n->sha1);
-		if (!n->tag || !n->tag->tag)
+		if (!n->tag || parse_tag(n->tag) || !n->tag->tag)
 			die("annotated tag %s not available", n->path);
 		if (strcmp(n->tag->tag, n->path))
 			warning("tag '%s' is really '%s' here", n->tag->tag, n->path);
-- 
1.5.4.3.509.gf785
Next: Shawn O. Pearce
Message 1 of 2 in “Paper bag fix git-describe on packed tags”
  1. Paper bag fix git-describe on packed tagsShawn O. Pearce, Mar 3, 2008
  2. Shawn O. PearceMar 3, 2008

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.