X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=tag.c;h=78d272b863f22285048cf54b9dcb03f80cb36f00;hb=a4da3388fd83e4b31273d71bebf8a92becd8f60c;hp=3aa186df628331e74e8a84d3cc2d313f4518a626;hpb=0cfba96121b9617668a7b4ad18e3ae3a19dc8755;p=~andy%2Fgit diff --git a/tag.c b/tag.c index 3aa186df6..78d272b86 100644 --- a/tag.c +++ b/tag.c @@ -24,6 +24,18 @@ struct object *deref_tag(struct object *o, const char *warn, int warnlen) return o; } +struct object *deref_tag_noverify(struct object *o) +{ + while (o && o->type == OBJ_TAG) { + o = parse_object(o->sha1); + if (o && o->type == OBJ_TAG && ((struct tag *)o)->tagged) + o = ((struct tag *)o)->tagged; + else + o = NULL; + } + return o; +} + struct tag *lookup_tag(const unsigned char *sha1) { struct object *obj = lookup_object(sha1);