libgit2 / libgit2/libgit2sharp
repo.Network.Remotes.Remove does not remove the remote
未关闭
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 3.5k
- 派生
- 925
- PR 合并指标
- 30 天内没有已合并 PR
描述
We have this code below where we remove remote (origin) before adding a new one. From time to time, Add would fail with remote already exists. Is there an issue where remote is not removed when calling repo.Network.Remotes.Remove? Is it a race condition? We doubt it is since rerun the same code still yield remote already exists. Anything we do wrong or can improve? BTW, if we run git remote remove origin command, then it is removed - so repo is not corrupted.
repo.Network.Remotes.Remove(_remoteAlias);
// Configure the remote
remote = repo.Network.Remotes.Add(_remoteAlias, remoteUrl, refSpec);
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 LibGit2SharpRepository.cs 第 234-237 行中引用的 Kudu 代码开始,跟踪后续 Add 之前的 repo.Network.Remotes.Remove 调用。重现报告的 remote-already-exists 行为,然后验证 remote 已被移除,并且可以再次添加而不会失败。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, git
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100