libgit2 / libgit2/libgit2sharp
Deleted tags show up in the list
未关闭
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 3.5k
- 派生
- 925
- PR 合并指标
- 30 天内没有已合并 PR
描述
Reproduction steps
- Add a new tag in github repository online (www.github.com).
- Run .Net core Controller.
- Added tag show up in the Api.
- Delete a tag in github repository online.
- Run controller and API.
- Deleted tag show up in API Controller.
-
_repository = new Repository("localfolderpath"); var network = _repository.Network.Remotes.First(); var refSpecs = new List<string>() { network.FetchRefSpecs.First().Specification }; var fetchOptions = new FetchOptions { TagFetchMode = TagFetchMode.All }; fetchOptions.CredentialsProvider = (_url, _user, _cred) => new DefaultCredentials(); fetchOptions.CredentialsProvider += (_url, _user, _cred) => _userNamePasswordCredentials; Commands.Pull(_repository, new Signature(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), DateTime.Now), new PullOptions() { FetchOptions = fetchOptions, MergeOptions = new MergeOptions() { MergeFileFavor = MergeFileFavor.Theirs, CommitOnSuccess = true } }); foreach (Remote remote in _repository.Network.Remotes) { Commands.Fetch(_repository, remote.Name, new string[0], fetchOptions, null); _repository.Network.Fetch(remote.Name, remote.FetchRefSpecs.Select(r => r.Specification), fetchOptions); }
Expected behavior
- Deleted tags shouldn't come up when using _repository.Tags
Actual behavior
- Deleted tags come up in _repository.Tags
Version of LibGit2Sharp (release number or SHA1)
Libgit2Sharp 0.26.2
Operating system(s) tested; .NET runtime tested
.Net Core 3.5, Microsoft Visual Studio Professional 2019 Version 16.9.0, .Net Framework 4.7.03190, Microsoft windows 10 pro.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用所示的 Pull 和 Fetch 调用通过 LibGit2Sharp 0.26.2 重现该问题,然后检查远程标签被删除后 _repository.Tags 是如何填充的。将获取的 refs 与预期的标签列表进行比较;当已删除的远程标签不再出现在 _repository.Tags 中时即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, git
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100