Commit 24e8a3c9 authored by Martin Koegler's avatar Martin Koegler Committed by Junio C Hamano

deref_tag: handle tag->tagged = NULL

Signed-off-by: default avatarMartin Koegler <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent affeef12
......@@ -9,7 +9,10 @@ const char *tag_type = "tag";
struct object *deref_tag(struct object *o, const char *warn, int warnlen)
{
while (o && o->type == OBJ_TAG)
o = parse_object(((struct tag *)o)->tagged->sha1);
if (((struct tag *)o)->tagged)
o = parse_object(((struct tag *)o)->tagged->sha1);
else
o = NULL;
if (!o && warn) {
if (!warnlen)
warnlen = strlen(warn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment