git/tag.h
René Scharfe b6e4cc8c32 tag: support arbitrary repositories in parse_tag()
Allow callers of parse_tag() pass in the repository to use.  Let most of
them pass in the_repository to get the same result as before.  One of
them has stopped using the_repository in ef9b0370da (sha1-name.c: store
and use repo in struct disambiguate_state, 2019-04-16); let it pass in
its stored repository.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-12-29 22:02:54 +09:00

24 lines
719 B
C

#ifndef TAG_H
#define TAG_H
#include "object.h"
extern const char *tag_type;
struct tag {
struct object object;
struct object *tagged;
char *tag;
timestamp_t date;
};
struct tag *lookup_tag(struct repository *r, const struct object_id *oid);
int parse_tag_buffer(struct repository *r, struct tag *item, const void *data, unsigned long size);
int parse_tag(struct repository *r, struct tag *item);
void release_tag_memory(struct tag *t);
struct object *deref_tag(struct repository *r, struct object *, const char *, int);
int gpg_verify_tag(struct repository *r, const struct object_id *oid,
const char *name_to_report, unsigned flags);
struct object_id *get_tagged_oid(struct tag *tag);
#endif /* TAG_H */