libgit2sharp icon indicating copy to clipboard operation
libgit2sharp copied to clipboard

Default commit order produces incorrectly arranged commits if commit date/time is the same

Open tapika opened this issue 3 years ago • 0 comments

By default when you pick up commits using function like this:

repo.Commits.ToArray()

Commits are organized by date time - and if it happens to be the same for two commits, they get randomly re-ordered.

Better query is like this:

repo.Commits.QueryBy(new CommitFilter() { SortBy = CommitSortStrategies.Topological }).ToArray()

Why this cannot be default just to avoid re-arrange problems ?

tapika avatar Jun 09 '22 13:06 tapika