-
Notifications
You must be signed in to change notification settings - Fork 904
Closed
Description
Repro steps:
- clone this project (libgit2) locally
- Write the following code:
var r = new Repository(@"C:\dev\github\libgit2sharp\.git");
foreach (var c in r.Commits.ToList()) {
Console.WriteLine(c);
}
It blows up with:
Unhandled Exception: System.ApplicationException: An error was raised by libgit2
. Error code = GIT_EOBJCORRUPTED (-28).
An error occured
at LibGit2Sharp.Core.Ensure.Success(Int32 result, Boolean allowPositiveResult
)
at LibGit2Sharp.Repository.Lookup(ObjectId id, GitObjectType type)
at LibGit2Sharp.RepositoryExtensions.Lookup[T](Repository repository, ObjectI
d id)
at LibGit2Sharp.CommitCollection.CommitEnumerator.get_Current()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)