1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-03-28 18:00:52 +01:00

line-log: handle deref_tag() returning NULL

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe 2020-10-11 18:03:40 +02:00 committed by Junio C Hamano
parent db7d07f610
commit 5eb2ed691b

View File

@ -481,7 +481,7 @@ static struct commit *check_single_commit(struct rev_info *revs)
if (obj->flags & UNINTERESTING)
continue;
obj = deref_tag(revs->repo, obj, NULL, 0);
if (obj->type != OBJ_COMMIT)
if (!obj || obj->type != OBJ_COMMIT)
die("Non commit %s?", revs->pending.objects[i].name);
if (commit)
die("More than one commit to dig from: %s and %s?",