Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
describe: re-fix display_name()
author
Junio C Hamano
<gitster@pobox.com>
Mon, 3 Mar 2008 23:54:23 +0000
(15:54 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 3 Mar 2008 23:54:23 +0000
(15:54 -0800)
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>
builtin-describe.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
870cf7d
)
diff --git
a/builtin-describe.c
b/builtin-describe.c
index 43be671827ee1ec1b9bebb61f803059e674ad5a2..7a5ab012b1fabe3f67cd2d9bc776794e34431d80 100644
(file)
--- 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);