Reputation: 2531
Repository have several types of commits:
How can I properly find commit by a SHA number?
My current solution:
return (Commit)repo.ObjectDatabase
.First(o =>
o.GetType() == typeof(Commit) &&
o.Sha.Equals(shortSha, StringComparison.InvariantCultureIgnoreCase));
My current solution iterates by all git objects, and searching takes a while.
I think here must be a better way.
Upvotes: 4
Views: 1134