CommitFilter / CommitSortStrategies Understanding
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Iniziare dagli entry point CommitFilter, CommitSortStrategies e QueryBy citati nell’issue, quindi confrontarne il comportamento con gli esempi di comandi git elencati. Documentare se ogni equivalenza proposta è corretta e specificare la semantica dell’ordinamento di CommitSortStrategies.None; il completamento si considera raggiunto quando le domande hanno una spiegazione autorevole.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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);
- Lingua principale
- C#
- Stelle
- 3.5k
- Fork
- 925
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di libgit2/libgit2sharp
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
libgit2/libgit2sharp#2193 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
libgit2/libgit2sharp#2192 · 1 commento ·
-
Website is down Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
libgit2/libgit2sharp#2191 · 2 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
libgit2/libgit2sharp#2189 · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
libgit2/libgit2sharp#2187 · 2 commenti ·
Tutte le issue di libgit2/libgit2sharp
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
azurenoops/spin_agent#975 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SubtitleEdit/subtitleedit#15108 · 1 commento ·