libgit2 / libgit2/libgit2sharp
Remotes are sometimes not returned for worktree
未關閉
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 3.5k
- 分支
- 925
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Reproduction steps
- Create repository with remote and commit.
- Create branch and create a worktree from that branch.
- Copy the path to worktree and run the following code:
var worktreePath = "Here is your worktree path";
var repositoryPath = Repository.Discover(worktreePath);
var repo = new Repository(repositoryPath);
var before = repo.Network.Remotes.ToArray();
_ = repo.Head.RemoteName;
var after = repo.Network.Remotes.ToArray();
Expected behavior
Both before and after variable contain remote.
Actual behavior
The before variable contains remote, after is empty.
Version of LibGit2Sharp (release number or SHA1)
Latest master: 7f59d22c4fdb7b3d14511aca567e64eefaa43ab2
Operating system(s) tested; .NET runtime tested
Windows, .NET Framework 462 and .NET Core 2.1. I believe it doesn't matter.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先在最新的 master 上執行報告中的 C# 重現,重點關注使用連結 worktree 時的 Repository.Discover、repo.Network.Remotes 和 repo.Head.RemoteName。追蹤存取 Head.RemoteName 為何會改變 remotes 的結果;當存取前後都包含該 repository remote 時即完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, git
- 領域
- tooling
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100