libgit2 / libgit2/libgit2sharp
Push fails with "No error message has been provided by the native library" when trying to push large files
Personne n'a encore pris cette issue.
- Langage dominant
- C#
- Étoiles
- 3.5k
- Forks
- 925
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Reproduisez l’échec en clonant un dépôt, en créant un fichier JSON d’environ 18 Mo, en le commitant et en appelant repo.Network.Push avec les PushOptions indiquées sur 0.27.0-preview-0182 ; comparez les mêmes étapes avec la dernière version stable. Suivez les points d’entrée de Repository et de repo.Network.Push et déterminez si la régression se situe dans la gestion du push ou dans le signalement des erreurs natives ; le travail est terminé lorsque le push du fichier volumineux réussit ou signale une erreur utile et exploitable.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp, git
- Domaine
- devtools
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100