tag: factor out get_tagged_oid()
[git/git.git] / tag.c
diff --git a/tag.c b/tag.c
index 5db870e..bfa0e31 100644 (file)
--- 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;
+}