Description
It looks like it is currently impossible to access the Tag
object from a Reference
that is a tag.
The C API provides git_reference_is_tag
and git_tag_lookup
, but there doesn't seem to be an equivalent functionality in pygit2
. Searching for git_tag_*
functions in src/
suggests that there are no hooks for the git_tag_*
functions.
Currently Tag
is a subclass of Object
. This doesn't really make sense. Unlike Blob
, Tree
, and Commit
a Tag
is a reference to a Commit
. Also, the docs for git_tag_tagger
leans toward Tag.Tagger
object to just be of type Signature
instead.
It makes sense to make Tag
a subclass of Reference
similar to Branch
, remove Tag.Tagger
(and replace with the already existing Signature
, changing Repository.create_tag
to match), and have Repository.References.get()
return a Tag
object where appropriate.