how to diff one file in working dir against a Blob?
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
pygit2 version python3-pygit2-0.23.3-2.fc23.x86_64
I cannot figure out how I can get a diff for only one file.
How do I arrange to have pygit2 return the diff of a Blob against the working dir file?
I looked at calling diff_to_working on a new Index(), but that fails because the new Index() does not
self._repo filled in.
TreeBuilder() seems is unable to help as it requires putting tree objects into the repo to allow
for the folder structure, for example to diff Source/file.py. needs a tree for Source. I clearly
do not want to be writting files into the repo to do a diff.
Did I miss something in API?
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 Überprüfung der in der Issue genannten diff_to_working- und Index-APIs sowie der Art und Weise, wie pygit2 einen Blob und eine Datei im Arbeitsverzeichnis darstellt. Ermittle, ob eine vorhandene API diesen Vergleich unterstützt, ohne Repository-Tree-Objekte zu erstellen; abgeschlossen ist die Aufgabe, wenn ein unterstützter Pfad für einen Diff zwischen einem einzelnen Blob und dem Arbeitsbaum identifiziert oder spezifiziert wurde.
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