summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f7de5a5)
raw | patch | inline | side by side (parent: f7de5a5)
author | Martin Koegler <mkoegler@auto.tuwien.ac.at> | |
Mon, 18 Feb 2008 20:48:01 +0000 (21:48 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 19 Feb 2008 03:25:26 +0000 (19:25 -0800) |
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c | patch | blob | history |
diff --git a/revision.c b/revision.c
index 484e5e7959d4583ed474e81f3a39e4569f2c7b76..b1aebf8999b5a9ba80cba659a28f9152c05da85c 100644 (file)
--- a/revision.c
+++ b/revision.c
@@ -177,6 +177,8 @@ static struct commit *handle_commit(struct rev_info *revs, struct object *object
struct tag *tag = (struct tag *) object;
if (revs->tag_objects && !(flags & UNINTERESTING))
add_pending_object(revs, object, tag->tag);
+ if (!tag->tagged)
+ die("bad tag");
object = parse_object(tag->tagged->sha1);
if (!object)
die("bad object %s", sha1_to_hex(tag->tagged->sha1));
it = get_reference(revs, arg, sha1, 0);
if (it->type != OBJ_TAG)
break;
+ if (!((struct tag*)it)->tagged)
+ return 0;
hashcpy(sha1, ((struct tag*)it)->tagged->sha1);
}
if (it->type != OBJ_COMMIT)