libgit2 / libgit2/libgit2sharp
Cloning pathing
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 3.5k
- Forks
- 925
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
After cloning a path like so:
DirectoryInfo dir = new DirectoryInfo("C:/APath/SomeOtherPath/");
Repository.Clone(dir.FullName, "Some other path");
The dir.FullName returns "C:\APath\SomeOtherPath" instead of forward slashes. The clone code runs correctly, but then trying to push from the clone back to the remote repo (using Git Extensions) gives a locational error saying it cannot locate the repository.
By making the modification to
Repository.Clone(dir.FullName.Replace('','/'), "Some other path");
it was able to find the repo when pushing.
It would be a nice feature to have the slashes standardized to forward slash -INSIDE- the Clone function, or at least throw an error saying it's not going to link properly, etc.
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 am im Issue beschriebenen Repository.Clone-Einstiegspunkt und stelle das Windows-Pfad-Beispiel mit DirectoryInfo.FullName nach. Überprüfe, dass das geklonte Repository für einen anschließenden Push verwendet werden kann, ohne dass Aufrufer Backslashes ersetzen müssen; das Issue ist abgeschlossen, wenn dieses Szenario funktioniert oder ein eindeutiger Validierungsfehler ausgegeben wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, git
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100