tag: allow lookup_tag to handle arbitrary repositories
[git] / tag.h
1 #ifndef TAG_H
2 #define TAG_H
3
4 #include "object.h"
5
6 extern const char *tag_type;
7
8 struct tag {
9         struct object object;
10         struct object *tagged;
11         char *tag;
12         timestamp_t date;
13 };
14 extern struct tag *lookup_tag(struct repository *r, const struct object_id *oid);
15 #define parse_tag_buffer(r, i, d, s) parse_tag_buffer_##r(i, d, s)
16 extern int parse_tag_buffer_the_repository(struct tag *item, const void *data, unsigned long size);
17 extern int parse_tag(struct tag *item);
18 extern void release_tag_memory(struct tag *t);
19 #define deref_tag(r, o, w, l) deref_tag_##r(o, w, l)
20 extern struct object *deref_tag_the_repository(struct object *, const char *, int);
21 extern struct object *deref_tag_noverify(struct object *);
22 extern int gpg_verify_tag(const struct object_id *oid,
23                 const char *name_to_report, unsigned flags);
24
25 #endif /* TAG_H */