deref_tag: handle return value NULL
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
9886ea417b
commit
affeef12fb
@ -578,8 +578,11 @@ static int handle_one_ref(const char *path,
|
||||
struct object *object = parse_object(sha1);
|
||||
if (!object)
|
||||
return 0;
|
||||
if (object->type == OBJ_TAG)
|
||||
if (object->type == OBJ_TAG) {
|
||||
object = deref_tag(object, path, strlen(path));
|
||||
if (!object)
|
||||
return 0;
|
||||
}
|
||||
if (object->type != OBJ_COMMIT)
|
||||
return 0;
|
||||
insert_by_date((struct commit *)object, list);
|
||||
|
Reference in New Issue
Block a user