libgit2 / libgit2/libgit2sharp
LibGit2Sharp.LibGit2SharpException, additional info code and category changed to int
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C#
- Star
- 3.5k
- Fork
- 925
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Mở LibGit2Sharp/LibGit2SharpException.cs và kiểm tra các dòng 58-59, nơi mã và các enum danh mục của libgit2 được ép kiểu thành int để cung cấp thêm thông tin. Thay đầu ra dạng số bằng các giá trị enum tương ứng, sau đó xác minh rằng dữ liệu ngoại lệ hiển thị tên enum dễ đọc thay vì số nguyên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp, git
- Lĩnh vực
- backend
- Loại issue
- Tính năng
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 35/100