X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=tag.c;h=b1ab75ff0164b0090f43ba55d2a70239ca2fdb7a;hb=211b5f9e62cc961acda59392fbf5a3efa8106c97;hp=2b25fc0e1dc53234e38e8ed8fdc1cb99fa4fd84a;hpb=98e031f0bb6e857c684e6db24d03d22cfc1a532a;p=git.git diff --git a/tag.c b/tag.c index 2b25fc0e..b1ab75ff 100644 --- a/tag.c +++ b/tag.c @@ -3,6 +3,13 @@ const char *tag_type = "tag"; +struct object *deref_tag(struct object *o) +{ + while (o && o->type == tag_type) + o = parse_object(((struct tag *)o)->tagged->sha1); + return o; +} + struct tag *lookup_tag(const unsigned char *sha1) { struct object *obj = lookup_object(sha1);