CommitLog order does not reflect order of commits.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the ordering problem with the shown LibGitRepositoryBuilder.WithManyCommits example and inspect how the repository commit log is enumerated. No source file or test is named in the issue, so locate the CommitLog implementation and existing log tests first. Done means commits created sequentially appear newest-first as expected.
Written by the indexing model from the issue text.
Description
Hi!
I am currently working on an E2E test which involves creating many commits, I am running into some issues however.
The repository's commit log order is different compared to the order of commits I have made.
Reproduction steps
public LibGitRepositoryBuilder WithManyCommits(int numberOfCommits, string commitMessage)
{
for (int i = 0; i < numberOfCommits; i++)
{
// Create & stage file.
var filePath = Path.Combine(_repoPath, $"{Guid.NewGuid()}.txt");
File.Create(filePath).Dispose();
var relativeFilePathToRoot = Path.GetRelativePath(_repository.Info.WorkingDirectory, filePath);
Commands.Stage(_repository, relativeFilePathToRoot);
_repository.Commit($"{commitMessage}-{i}", new Signature("bot", "bot@noreply.com", DateTimeOffset.UtcNow), new Signature("bot", "bot@noreply.com", DateTimeOffset.UtcNow));
}
return this;
}
var repo = new LibGitRepositoryBuilder(path)
.WithManyCommits(100, "Hello world")
.Build();
Expected behavior
- "Hello world-99"
- "Hello world-98"
- "Hello world-97"
- ....
Actual behavior
Version of LibGit2Sharp (release number or SHA1)
0.30.0
Operating system(s) tested; .NET runtime tested
OS
Edition Windows 11 Pro for Workstations
Version 23H2
Installed on 22/02/2024
OS build 22631.3593
Experience Windows Feature Experience Pack 1000.22700.1003.0
.NET
.NET 8.0
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
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.
More from libgit2/libgit2sharp
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
libgit2/libgit2sharp#2193 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
libgit2/libgit2sharp#2192 · 1 comment ·
-
Website is down Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
libgit2/libgit2sharp#2191 · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
libgit2/libgit2sharp#2189 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
libgit2/libgit2sharp#2187 · 2 comments ·
All issues in libgit2/libgit2sharp
Similar issues
-
:watch: Not Triaged dotnet-fsharp/svc
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Azure/azure-sdk-for-net#63292 · 3 comments · 1 reaction ·
-
Issue-Enhancement Needs-Triage
Difficulty 1/5 Under an hour Newbie friendliness 86/100
PowerShell/PowerShell#28061 · 2 reactions ·
-
dependencies needs-team-triage server-Azure.Mcp
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
aspnet-core/svc aspnetcore-signalr/subsvc doc-enhancement Pri2 SignalR
Difficulty 1/5 Under an hour Newbie friendliness 88/100
dotnet/AspNetCore.Docs#37729 ·