зеркало из https://github.com/microsoft/git.git
[PATCH] git-rev-list: avoid crash on broken repository
When following tags, check for parse_object() success and error out properly instead of segfaulting. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
cc5625a5e2
Коммит
7f1335c74c
|
@ -418,6 +418,8 @@ static struct commit *get_commit_reference(const char *name, unsigned int flags)
|
|||
if (tag_objects && !(object->flags & UNINTERESTING))
|
||||
add_pending_object(object, tag->tag);
|
||||
object = parse_object(tag->tagged->sha1);
|
||||
if (!object)
|
||||
die("bad object %s", sha1_to_hex(tag->tagged->sha1));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче