diff options
author | René Scharfe <l.s.r@web.de> | 2019-09-05 22:55:55 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-09-06 00:10:18 +0300 |
commit | dad3f0607bf1c864f80723ab20b39527260f2c4f (patch) | |
tree | 6244ac7c9264fa111df3523c8c384bb395abd98c /tag.h | |
parent | 745f6812895b31c02b29bdfe4ae8e5498f776c26 (diff) |
tag: factor out get_tagged_oid()
Add a function for accessing the ID of the object referenced by a tag
safely, i.e. without causing a segfault when encountering a broken tag
where ->tagged is NULL.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tag.h')
-rw-r--r-- | tag.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -19,5 +19,6 @@ struct object *deref_tag(struct repository *r, struct object *, const char *, in 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 */ |