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>
This commit is contained in:
parent
870cf7d698
commit
3167d72565
@ -156,7 +156,7 @@ static void display_name(struct commit_name *n)
|
|||||||
{
|
{
|
||||||
if (n->prio == 2 && !n->tag) {
|
if (n->prio == 2 && !n->tag) {
|
||||||
n->tag = lookup_tag(n->sha1);
|
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);
|
die("annotated tag %s not available", n->path);
|
||||||
if (strcmp(n->tag->tag, n->path))
|
if (strcmp(n->tag->tag, n->path))
|
||||||
warning("tag '%s' is really '%s' here", n->tag->tag, n->path);
|
warning("tag '%s' is really '%s' here", n->tag->tag, n->path);
|
||||||
|
Loading…
Reference in New Issue
Block a user