We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa70916 commit 11c700dCopy full SHA for 11c700d
LibGit2Sharp/TreeDefinition.cs
@@ -310,7 +310,12 @@ internal Tree Build(Repository repository)
310
builtTreeEntryDefinitions.ForEach(t => entries[t.Item1] = t.Item2);
311
312
ObjectId treeId = builder.Write();
313
- return repository.Lookup<Tree>(treeId);
+ var result = repository.Lookup<Tree>(treeId);
314
+ if (result == null)
315
+ {
316
+ throw new LibGit2SharpException("Unable to read created tree");
317
+ }
318
+ return result;
319
}
320
321
0 commit comments