libgit2 / libgit2/libgit2sharp
Push fails with "No error message has been provided by the native library" when trying to push large files
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 3.5k
- Forks
- 925
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I am not able to push large files to origin with pre-release 0.27.0-preview-0182. The same code worked with latest stable release
Ending up with exception and message: "No error message has been provided by the native library"
Tried to push a new json file which is 18MB large.
I did not check what file size is the breaking point, but if needed can try to investigate that too.
Adding reproduction steps with snippets of my code, hope this is enough, otherwise please ask for more.
Reproduction steps
- Clone repository and create branch
Repository.Clone(githubRepoUrl, $"./{folderName}",
new CloneOptions { CredentialsProvider = _gitHubClientWrapper.CredentialsProvider() });
using (var repo = new Repository($"./{folderName}"))
{
repo.CreateBranch(newBranchName);
}
- Create large file. I just generated a large list of objects serialized into json. Got around 18mb of json file.
- Commit and push the branch to origin
using (var repo = new Repository($"./{folderName}"))
{
Branch branch = repo.Branches[newBranchName];
Commands.Checkout(repo, branch);
Commands.Stage(repo, "*");
Signature committer = new Signature("Github bot", "@bot", DateTime.Now);
try
{
repo.Commit("Comit message", committer, committer);
Remote remote = repo.Network.Remotes["origin"];
repo.Branches.Update(branch, b => b.Remote = remote.Name, b => b.UpstreamBranch = branch.CanonicalName);
repo.Network.Push(branch, new PushOptions
{
CredentialsProvider = _gitHubClientWrapper.CredentialsProvider(),
});
}
catch (EmptyCommitException)
{
_logger.LogInformation("There's nothing to commit.");
return;
}
}
Expected behavior
Push is successful.
Actual behavior
Push fails with exception and message "No error message has been provided by the native library"
Version of LibGit2Sharp (release number or SHA1)
0.27.0-preview-0182
Operating system(s) tested; .NET runtime tested
Windows11, .NET 7
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
Reproduziere den Fehler, indem du ein Repository klonst, eine ungefähr 18 MB große JSON-Datei erstellst, sie committest und auf 0.27.0-preview-0182 repo.Network.Push mit den angegebenen PushOptions aufrufst; vergleiche dieselben Schritte mit der neuesten stabilen Version. Verfolge die Einstiegspunkte von Repository und repo.Network.Push und ermittle, ob die Regression in der Push-Verarbeitung oder in der nativen Fehlerberichterstattung liegt; abgeschlossen ist die Aufgabe, wenn der Push der großen Datei erfolgreich ist oder einen nützlichen, umsetzbaren Fehler meldet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, git
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100