pygit2: How to implement `git clone --single-branch`?
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
$ git clone -h
usage: git clone [<options>] [--] <repo> [<dir>]
...
-b, --branch <branch>
checkout <branch> instead of the remote's HEAD
...
--single-branch clone only one branch, HEAD or --branch
Hi, all. git clone has an option (i.e. --single-branch) to specify only clone one branch.
Just wonder if anyone knows how to implement this functionality with pygit2?
With --single-branch, git branch -a will has only one branch, not all remote branches.
--
Might be helpful:
https://github.com/libgit2/libgit2/issues/2924
https://github.com/nodegit/nodegit/issues/1669
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 Clone-Funktionalität von pygit2 und vergleiche sie mit dem dokumentierten Verhalten von git clone --single-branch. Prüfe die verlinkten libgit2- und nodegit-Issues auf Implementierungskontext; abgeschlossen ist die Aufgabe, wenn nur HEAD oder der ausgewählte Branch geklont wird, sodass git branch -a nicht alle Remote-Branches anzeigt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git, python
- Bereich
- devtools
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100