else
object_list_insert(object, &wants);
- if (!tag->tagged)
- die("bad tag");
- object = parse_object_or_die(&tag->tagged->oid, NULL);
+ object = parse_object_or_die(get_tagged_oid(tag), NULL);
}
if (object->flags & UNINTERESTING)
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(revs->repo, &tag->tagged->oid);
+ object = parse_object(revs->repo, get_tagged_oid(tag));
if (!object) {
if (revs->ignore_missing_links || (flags & UNINTERESTING))
return NULL;
free(data);
return ret;
}
+
+struct object_id *get_tagged_oid(struct tag *tag)
+{
+ if (!tag->tagged)
+ die("bad tag");
+ return &tag->tagged->oid;
+}
struct object *deref_tag_noverify(struct object *);
int gpg_verify_tag(const struct object_id *oid,
const char *name_to_report, unsigned flags);
+struct object_id *get_tagged_oid(struct tag *tag);
#endif /* TAG_H */