libgit2 / libgit2/libgit2sharp
Reading Branch.UpstreamBranchCanonicalName throws an exception
オープン
まだ誰も着手していません。
Up for grabs
- 主要言語
- C#
- スター
- 3.5k
- フォーク
- 925
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
LibGit2 0.24.0. In C#, when I access the UpstreamBranchCanonicalName property on Branch I get this exception:
Message : Value cannot be null.
Parameter name: name
ParamName : name
Data : {}
InnerException :
TargetSite : System.String get_UpstreamBranchCanonicalName()
StackTrace : at LibGit2Sharp.Branch.get_UpstreamBranchCanonicalName()
at LibGit2.Automation.BranchInfo..ctor(Branch branch)
HelpLink :
Source : LibGit2Sharp
HResult : -2147467261
I am enumerating the branches in PowerShell:
$repo.Branches |
ForEach-Object { New-Object LibGit2.Automation.BranchInfo $_ }
The constructor for my LibGit2.Automation.BranchInfo object is where Branch throws an exception:
public BranchInfo(Branch branch)
{
Name = branch.FriendlyName;
CanonicalName = branch.CanonicalName;
UpstreamBranchCanonicalName = branch.UpstreamBranchCanonicalName;
IsRemote = branch.IsRemote;
IsTracking = branch.IsTracking;
IsCurrentRepositoryHead = branch.IsCurrentRepositoryHead;
Tip = new CommitInfo(branch.Tip);
}
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、LibGit2.Automation.BranchInfo コンストラクターを介して repo.Branches を列挙する際に例外を再現し、レポートに示されている Branch.UpstreamBranchCanonicalName へのアクセスに焦点を当てます。null-name エラーを発生させるブランチでの動作を検証し、例外なしでブランチの列挙が完了することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, git
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100