tag objects from references
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the existing hooks in src/ and the Repository.References.get() and Repository.create_tag entry points, then compare them with git_reference_is_tag, git_tag_lookup, and the other git_tag_* functions. Done means tag references expose a Tag object, Tag follows the proposed Reference model, and tagger handling uses Signature consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100