summaryrefslogtreecommitdiff
path: root/builtin-describe.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-03 09:24:17 -0800
committerJunio C Hamano <gitster@pobox.com>2008-03-03 09:24:17 -0800
commitc374b91cf295f437d438a103bfd2cf3fffcce580 (patch)
tree1291826a9ecc1e7b2193413bc0f855b9476b5802 /builtin-describe.c
parentf3ec549481827b10609a43bf504517a0e8063a12 (diff)
downloadgit-c374b91cf295f437d438a103bfd2cf3fffcce580.tar.gz
git-describe: use tags found in packed-refs correctly
When your refs are packed, "git-describe" can find the tag that is the best match without ever parsing the tag itself. But lookup_tag() in display_name() says "I've never seen it", creates an empty shell, and returns it. We need to make sure that we actually have parsed the tag data into it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-describe.c')
-rw-r--r--builtin-describe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-describe.c b/builtin-describe.c
index 2f1e7ba150..c549d362b2 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 (parse_tag(n->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);