Support for creating zip archives
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
Given that pygit2 is probably the best option for Python developers building cross-platform Git applications
When a Windows (or, to a lesser extent) Mac user wants to create an archive, equivalent to using the git archive command,
Then they probably are going to want to create a zip archive
So that archive can be opened easily with their system's default file explorer
pygit2.Repository.write_archive currently only supports tarfiles.
I have written my own version of this method that I would like to contribute back to the project which supports creating zip archives, to the extent possible with the zipfile library (read: does not support symlink).
If that is something the maintainers would be interested in, please let me know, and I'll rework this into a PR that adds the code to repository.py and matches the existing style guide.
Thanks for building and maintaining such a stellar library!
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 in repository.py bei Repository.write_archive und vergleiche dessen aktuelles tarfile-Verhalten mit der im Issue verlinkten vorgeschlagenen Implementierung auf Basis von zipfile. Bestätige die unterstützten Archivoptionen und die angegebene Einschränkung für Symlinks; betrachte die Arbeit dann als abgeschlossen, wenn write_archive ZIP-Archive für den angeforderten plattformübergreifenden Anwendungsfall erstellen kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git, python
- Bereich
- backend
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100