libgit2 / libgit2/libgit2sharp
Repository Clone Throws No error message has been provided by the native library Exception
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 3.5k
- 派生
- 925
- PR 合并指标
- 30 天内没有已合并 PR
描述
Am trying list down the Remote Branches in my application. am getting No error message has been provided by the native library while cloning. its only happening on the few repos.
var path = LibGit2Sharp.Repository.Clone(sourceUrl, workingDirectoryPath, cloneOptions);
if (!bare)
{
using (var repo = new LibGit2Sharp.Repository(path))
{
repo.Reset(ResetMode.Hard);
}
}
return path;
Trace
LibGit2Sharp.LibGit2SharpException: No error message has been provided by the native library

at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)

at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts)

at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options)

Reproduction steps
Am trying to clone huge repo with size around 750MB
Expected behavior
Clone the repository with out any error
Actual behavior
Should not throw "No error message has been provided by the native library Exception"
Version of LibGit2Sharp
0.26.0
Operating system(s) tested; .NET runtime tested
Local - WIndows Machine - its properly working
L2, L1 - Linux Docker Container - failing
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先在 Linux Docker 环境中通过 Repository.Clone 重现该故障,并将其与正常工作的 Windows 情况进行比较。通过 Core.Ensure.HandleError 和 Proxy.git_clone 跟踪报告的路径;当受影响的 repository 能够在不出现 native-library exception 的情况下完成克隆,并且由此产生的错误行为得到覆盖时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, git
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100