X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=tag.c;h=78d272b863f22285048cf54b9dcb03f80cb36f00;hb=2593633f5a7e1ddc02cd5f8256d02a53324e4cf6;hp=7d38cc0f4de1c16b5b52725ba7a6a361650a6b41;hpb=54633cd53bf22672aed900a2a9df5d4f92548091;p=git.git diff --git a/tag.c b/tag.c index 7d38cc0f4..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); @@ -139,6 +151,11 @@ int parse_tag(struct tag *item) return ret; } +/* + * Look at a signed tag object, and return the offset where + * the embedded detached signature begins, or the end of the + * data when there is no such signature. + */ size_t parse_signature(const char *buf, unsigned long size) { char *eol;