summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-03 23:54:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-03-03 23:54:23 (GMT)
commit3167d7256505cdeace5293bc67f0d16657a9277e (patch)
treeb4d223f8d8ebf4bdd36a769e7957b8b8cde40880
parent870cf7d69872ebc925989b400fb4e7031870db5f (diff)
downloadgit-3167d7256505cdeace5293bc67f0d16657a9277e.zip
git-3167d7256505cdeace5293bc67f0d16657a9277e.tar.gz
git-3167d7256505cdeace5293bc67f0d16657a9277e.tar.bz2
describe: re-fix display_name()
It is implausible for lookup_tag() to return NULL in this particular codepath but we should protect ourselves against a broken repository better. Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin-describe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-describe.c b/builtin-describe.c
index 43be671..7a5ab01 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 (parse_tag(n->tag) || !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);