libgit2 / libgit2/libgit2sharp
LibGit2Sharp.LibGit2SharpException, additional info code and category changed to int
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 3.5k
- フォーク
- 925
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
The following is taken from a log file:
LibGit2Sharp.LibGit2SharpException: Failed to map 'false?'
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_checkout_tree(RepositorySafeHandle repo, ObjectId treeId, GitCheckoutOpts& opts)
at LibGit2Sharp.Repository.CheckoutTree(Tree tree, IList`1 paths, IConvertableToGitCheckoutOpts opts)
at LibGit2Sharp.Repository.Checkout(Tree tree, CheckoutOptions checkoutOptions, String refLogHeadSpec)
at LibGit2Sharp.Repository.Checkout(Branch branch, CheckoutOptions options)
Additional Data:
libgit2.code: -1
libgit2.category: 7
As you can see, both code and category are numbers here. But internally they are enums, it would be a lot easier to read this if the enums where used in the additional info, instead of the int.
LibGit2Sharp/LibGit2SharpException.cs
affected lines 58,59, where the enum is cast to int.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
LibGit2Sharp/LibGit2SharpException.cs を開き、58-59 行目を確認します。ここでは、追加情報のために libgit2 のコードとカテゴリ enum が int にキャストされています。数値出力を対応する enum 値に置き換え、例外データに整数ではなく読みやすい enum 名が表示されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, git
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100