Skip to content

Commit adbf3fc

Browse files
committed
Temporary revert of the null Trees diffing feature
1 parent ec1a6b7 commit adbf3fc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.IO;
1+
using System.IO;
32
using System.Linq;
43
using System.Text;
54
using LibGit2Sharp.Tests.TestHelpers;
@@ -356,7 +355,7 @@ public void CanCompareTwoVersionsOfAFileWithADiffOfTwoHunks()
356355
}
357356
}
358357

359-
[Fact]
358+
[Fact(Skip = "Not working against libgit2 debug version.")]
360359
public void CanCompareATreeAgainstANullTree()
361360
{
362361
using (var repo = new Repository(StandardTestRepoPath))
@@ -379,7 +378,7 @@ public void CanCompareATreeAgainstANullTree()
379378
}
380379
}
381380

382-
[Fact]
381+
[Fact(Skip = "Not working against libgit2 debug version.")]
383382
public void ComparingTwoNullTreesReturnsAnEmptyTreeChanges()
384383
{
385384
using (var repo = new Repository(StandardTestRepoPath))

LibGit2Sharp/Diff.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ internal Diff(Repository repo)
7070
/// <returns>A <see cref = "TreeChanges"/> containing the changes between the <paramref name = "oldTree"/> and the <paramref name = "newTree"/>.</returns>
7171
public virtual TreeChanges Compare(Tree oldTree, Tree newTree, IEnumerable<string> paths = null)
7272
{
73+
//TODO: The checks below will be removed when running against next libgit2 binaries
74+
Ensure.ArgumentNotNull(oldTree, "oldTree");
75+
Ensure.ArgumentNotNull(newTree, "newTree");
76+
7377
using(GitDiffOptions options = BuildOptions(paths))
7478
using (DiffListSafeHandle diff = BuildDiffListFromTrees(
7579
oldTree != null ? oldTree.Id : null,

0 commit comments

Comments
 (0)