libgit2 / libgit2/libgit2sharp
Default commit order produces incorrectly arranged commits if commit date/time is the same
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
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 ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing repo.Commits and CommitFilter, including CommitSortStrategies.Topological, to find how the default commit ordering is selected. Check how equal commit dates are handled and add coverage for that case; done means the default result does not randomly reorder commits with identical dates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100