libgit2sharp
libgit2sharp copied to clipboard
Diff compare with DiffTargets.WorkingDirectory is terribly slow
Reproduction steps
Compare commit to the working tree directory on a relatively big repository
repository.Diff.Compare<TreeChanges>(
repository.Head.Tip.Tree,
DiffTargets.WorkingDirectory)
which takes a long time or never completes. Comparing the working trees of two commits works instantly
var branchDiffResult = repository.Diff.Compare<TreeChanges>(
targetCommit.Tree,
repository.Head.Tip.Tree,
compareOptions);
Additionally, doing repository.RetrieveStatus()
is also slow, but not that slow.
Expected behavior
The speed of the two matches.
Actual behavior
Comparing to working directory is terribly slow.
Version of LibGit2Sharp (release number or SHA1)
0.27.0.0
Operating system(s) tested; .NET runtime tested
4.72, windows 11
I encounter the same problem.