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);
}
2. Create large file. I just generated a large list of objects serialized into json. Got around 18mb of json file.
3. 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
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
using (var repo = new Repository($"./{folderName}")) { repo.CreateBranch(newBranchName); }
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);
}