aboutsummaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-09-30 13:19:29 +0900
committerJunio C Hamano <gitster@pobox.com>2019-09-30 13:19:29 +0900
commitcf861cd7a018481e8323444d29fe9e6b73c19a06 (patch)
tree854763ac66980d68f83300660e4a88a5c0cc2d23 /tag.c
parent91243b019ddba5248f0fde319bc75e4e2b5602b0 (diff)
parentc77722b3ea42a87381915f1203648a5f5d86c1ff (diff)
downloadgit-cf861cd7a018481e8323444d29fe9e6b73c19a06.tar.xz
Merge branch 'rs/get-tagged-oid'
Code cleanup. * rs/get-tagged-oid: use get_tagged_oid() tag: factor out get_tagged_oid()
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tag.c b/tag.c
index 5db870edb9..bfa0e31435 100644
--- a/tag.c
+++ b/tag.c
@@ -212,3 +212,10 @@ int parse_tag(struct tag *item)
free(data);
return ret;
}
+
+struct object_id *get_tagged_oid(struct tag *tag)
+{
+ if (!tag->tagged)
+ die("bad tag");
+ return &tag->tagged->oid;
+}