CommitFilter / CommitSortStrategies Understanding
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu với các entry point CommitFilter, CommitSortStrategies và QueryBy được tham chiếu trong issue, sau đó so sánh hành vi của chúng với các ví dụ lệnh git được liệt kê. Ghi lại liệu từng phép tương đương được đề xuất có chính xác hay không và nêu rõ ngữ nghĩa sắp xếp của CommitSortStrategies.None; công việc được xem là hoàn thành khi các câu hỏi có lời giải thích có thẩm quyền.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I am trying to understand what "CommitSortStrategies" is actually doing to the commit collections that I am getting back and am just looking for clarification if this is correct.
Git, by default (cmd line app), are shown in reverse chronological order, so:
- git (default sort) == CommitFilter/SortBy of (Undefined)
- git --reverse != CommitFilter/SortBy of Reverse
- git --reverse == CommitFilter/SortBy of Reverse | Time
- git --topo-order == CommitFilter/SortBy of Topological
- git --reverse --topo-order == CommitFilter/SortBy of Reverse | Topological
- git --______ ?= CommitFilter/SortBy of None
- CommitFilter/SortBy of None != CommitFilter/SortBy of (Undefined)
Is that list correct/complete?
(FYI: I have a multi-million object repo with millions of refs and have reverted to shelling to git to get the commit lists between cross-merge branches as I can not get a direct match between libgit2's ls-trees and gits, my head hurts....)
BTW: What order does CommitSortStrategies.None follow? Based on ref creation order on the file-system, maybe?
A sample for a future reader:
# Note: Piping to head as you can not use -n <number>, --max-count=<number> as that is applied before commit ordering
git log HEAD..master --format="%ci %h %s" --reverse | head -10
So based upon the equivalence list above, in libgit2sharp this becomes:
var filter = new CommitFilter {
SortBy = CommitSortStrategies.Reverse | CommitSortStrategies.Time,
Since = master, // determined by a prior repo.Lookup<Tree>
Until = head, // determined by a prior repo.Lookup<Tree>
};
repo.Commits.QueryBy(filter).Take(10);
- 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
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.
Issue khác của libgit2/libgit2sharp
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
libgit2/libgit2sharp#2193 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
libgit2/libgit2sharp#2192 · 1 bình luận ·
-
Website is down Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
libgit2/libgit2sharp#2191 · 2 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
libgit2/libgit2sharp#2189 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
libgit2/libgit2sharp#2187 · 2 bình luận ·
Tất cả issue của libgit2/libgit2sharp
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
azurenoops/spin_agent#975 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SubtitleEdit/subtitleedit#15108 · 1 bình luận ·