Skip to content

Commit 1502b93

Browse files
committed
Throw NotFoundException if trees are missing when computing diff
1 parent d8ec410 commit 1502b93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LibGit2Sharp/Core/Proxy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,8 +797,8 @@ public static unsafe DiffHandle git_diff_tree_to_tree(
797797
ObjectId newTree,
798798
GitDiffOptions options)
799799
{
800-
using (var osw1 = new ObjectSafeWrapper(oldTree, repo, true))
801-
using (var osw2 = new ObjectSafeWrapper(newTree, repo, true))
800+
using (var osw1 = new ObjectSafeWrapper(oldTree, repo, true, throwIfMissing: true))
801+
using (var osw2 = new ObjectSafeWrapper(newTree, repo, true, throwIfMissing: true))
802802
{
803803
git_diff* diff;
804804
int res = NativeMethods.git_diff_tree_to_tree(out diff, repo, osw1.ObjectPtr, osw2.ObjectPtr, options);

0 commit comments

Comments
 (0)