tag objects from references
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 1.7k
- Forks
- 408
- Ø Merge
- 2 T. 57 Min.
- Gemergte PRs (30 T.)
- 7
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Untersuchung der vorhandenen Hooks in src/ und der Einstiegspunkte Repository.References.get() und Repository.create_tag. Vergleiche sie anschließend mit git_reference_is_tag, git_tag_lookup und den anderen git_tag_*-Funktionen. Die Arbeit ist abgeschlossen, wenn Tag-Referenzen ein Tag-Objekt offenlegen, Tag dem vorgeschlagenen Reference-Modell folgt und die Behandlung von tagger durchgängig Signature verwendet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git, python
- Bereich
- api
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100