Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: libgit2/libgit2sharp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.29.0
Choose a base ref
...
head repository: libgit2/libgit2sharp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.30.0
Choose a head ref
  • 18 commits
  • 101 files changed
  • 1 contributor

Commits on Mar 16, 2024

  1. Copy the full SHA
    2cad6cd View commit details
  2. Address trimming warnings

    bording committed Mar 16, 2024
    Copy the full SHA
    70ac848 View commit details
  3. Use .NET 8 SDK

    bording committed Mar 16, 2024
    Copy the full SHA
    29b7380 View commit details
  4. Fix failing test

    bording committed Mar 16, 2024
    Copy the full SHA
    ea4e6c9 View commit details
  5. Merge pull request #2084 from libgit2/trimming

    Updates for trimming compatibility
    bording authored Mar 16, 2024
    Copy the full SHA
    d9bf967 View commit details
  6. Add net8.0 test targets

    bording committed Mar 16, 2024
    Copy the full SHA
    4e8e00e View commit details
  7. Copy the full SHA
    2b585e9 View commit details
  8. Update packages

    bording committed Mar 16, 2024
    Copy the full SHA
    c9352c3 View commit details
  9. Fix test analyzer warnings

    bording committed Mar 16, 2024
    Copy the full SHA
    9e4669c View commit details
  10. Update workflow actions

    bording committed Mar 16, 2024
    Copy the full SHA
    8d79ff4 View commit details
  11. Update testing matrix

    bording committed Mar 16, 2024
    Copy the full SHA
    4193f6b View commit details
  12. Fix analyzer warnings

    bording committed Mar 16, 2024
    Copy the full SHA
    c407371 View commit details
  13. Clean up more analyzer warnings

    bording committed Mar 16, 2024
    Copy the full SHA
    729ef8d View commit details
  14. Merge pull request #2085 from libgit2/net8-updates

    Updates for .NET 8
    bording authored Mar 16, 2024
    Copy the full SHA
    bfdb02a View commit details
  15. Update LibGit2Sharp.NativeBinaries to 2.0.322

    bording committed Mar 16, 2024
    Copy the full SHA
    e170336 View commit details

Commits on Mar 17, 2024

  1. Increase assert range to avoid flaky tests

    bording committed Mar 17, 2024
    Copy the full SHA
    a373623 View commit details
  2. Merge pull request #2086 from libgit2/native-binaries

    Update LibGit2Sharp.NativeBinaries to 2.0.322
    bording authored Mar 17, 2024
    Copy the full SHA
    2b84c8e View commit details

Commits on Mar 19, 2024

  1. Update CHANGES.md for v0.30

    bording committed Mar 19, 2024
    Copy the full SHA
    5085a0c View commit details
Showing with 545 additions and 345 deletions.
  1. +43 −18 .github/workflows/ci.yml
  2. +1 −1 .gitignore
  3. +8 −1 CHANGES.md
  4. +2 −3 Directory.Build.props
  5. +2 −3 LibGit2Sharp.Tests/BranchFixture.cs
  6. +1 −1 LibGit2Sharp.Tests/CloneFixture.cs
  7. +42 −37 LibGit2Sharp.Tests/CommitFixture.cs
  8. +2 −2 LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs
  9. +14 −14 LibGit2Sharp.Tests/FetchFixture.cs
  10. +1 −1 LibGit2Sharp.Tests/FilterBranchFixture.cs
  11. +7 −10 LibGit2Sharp.Tests/FilterFixture.cs
  12. +7 −7 LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
  13. +11 −14 LibGit2Sharp.Tests/MetaFixture.cs
  14. +4 −4 LibGit2Sharp.Tests/NetworkFixture.cs
  15. +1 −2 LibGit2Sharp.Tests/PushFixture.cs
  16. +1 −1 LibGit2Sharp.Tests/ReferenceFixture.cs
  17. +15 −8 LibGit2Sharp.Tests/ReflogFixture.cs
  18. +1 −1 LibGit2Sharp.Tests/RemoveFixture.cs
  19. +2 −2 LibGit2Sharp.Tests/RepositoryFixture.cs
  20. +3 −3 LibGit2Sharp.Tests/StageFixture.cs
  21. +5 −3 LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
  22. +2 −2 LibGit2Sharp.Tests/TestHelpers/Constants.cs
  23. +1 −1 LibGit2Sharp.Tests/UnstageFixture.cs
  24. +8 −8 LibGit2Sharp.Tests/desktop/SmartSubtransportFixture.cs
  25. +9 −3 LibGit2Sharp/AmbiguousSpecificationException.cs
  26. +7 −1 LibGit2Sharp/BareRepositoryException.cs
  27. +3 −3 LibGit2Sharp/BlameHunk.cs
  28. +1 −1 LibGit2Sharp/BlameHunkCollection.cs
  29. +1 −1 LibGit2Sharp/Blob.cs
  30. +7 −1 LibGit2Sharp/CheckoutConflictException.cs
  31. +1 −2 LibGit2Sharp/Commands/Pull.cs
  32. +1 −1 LibGit2Sharp/Commands/Stage.cs
  33. +3 −3 LibGit2Sharp/Conflict.cs
  34. +8 −8 LibGit2Sharp/Core/EncodingMarshaler.cs
  35. +1 −1 LibGit2Sharp/Core/Ensure.cs
  36. +1 −1 LibGit2Sharp/Core/FileHistory.cs
  37. +2 −2 LibGit2Sharp/Core/FilePathMarshaler.cs
  38. +1 −1 LibGit2Sharp/Core/GitBlame.cs
  39. +11 −11 LibGit2Sharp/Core/GitDiff.cs
  40. +6 −0 LibGit2Sharp/Core/GitObjectLazyGroup.cs
  41. +1 −1 LibGit2Sharp/Core/GitOdbBackend.cs
  42. +2 −2 LibGit2Sharp/Core/GitOdbBackendStream.cs
  43. +2 −2 LibGit2Sharp/Core/GitStrArrayNative.cs
  44. +1 −1 LibGit2Sharp/Core/HistoryRewriter.cs
  45. +9 −0 LibGit2Sharp/Core/LazyGroup.cs
  46. +6 −6 LibGit2Sharp/Core/NativeMethods.cs
  47. +4 −0 LibGit2Sharp/Core/Platform.cs
  48. +10 −10 LibGit2Sharp/Core/Proxy.cs
  49. +7 −7 LibGit2Sharp/Core/TarWriter.cs
  50. +2 −2 LibGit2Sharp/Core/Utf8Marshaler.cs
  51. +2 −3 LibGit2Sharp/Diff.cs
  52. +7 −1 LibGit2Sharp/EmptyCommitException.cs
  53. +8 −1 LibGit2Sharp/EntryExistsException.cs
  54. +1 −1 LibGit2Sharp/FetchHead.cs
  55. +6 −6 LibGit2Sharp/Filter.cs
  56. +4 −4 LibGit2Sharp/GitObject.cs
  57. +2 −2 LibGit2Sharp/GlobalSettings.cs
  58. +3 −3 LibGit2Sharp/IndexEntry.cs
  59. +3 −3 LibGit2Sharp/IndexNameEntry.cs
  60. +3 −3 LibGit2Sharp/IndexReucEntry.cs
  61. +7 −1 LibGit2Sharp/InvalidSpecificationException.cs
  62. +8 −3 LibGit2Sharp/LibGit2Sharp.csproj
  63. +8 −3 LibGit2Sharp/LibGit2SharpException.cs
  64. +7 −1 LibGit2Sharp/LockedFileException.cs
  65. +7 −1 LibGit2Sharp/MergeFetchHeadNotFoundException.cs
  66. +7 −1 LibGit2Sharp/NameConflictException.cs
  67. +8 −5 LibGit2Sharp/NativeException.cs
  68. +7 −1 LibGit2Sharp/NonFastForwardException.cs
  69. +7 −1 LibGit2Sharp/NotFoundException.cs
  70. +3 −3 LibGit2Sharp/Note.cs
  71. +9 −9 LibGit2Sharp/ObjectDatabase.cs
  72. +7 −7 LibGit2Sharp/ObjectId.cs
  73. +1 −1 LibGit2Sharp/OdbBackend.cs
  74. +1 −1 LibGit2Sharp/PackBuilder.cs
  75. +7 −1 LibGit2Sharp/PeelException.cs
  76. +2 −2 LibGit2Sharp/PushUpdate.cs
  77. +6 −0 LibGit2Sharp/RecurseSubmodulesException.cs
  78. +4 −4 LibGit2Sharp/Reference.cs
  79. +1 −1 LibGit2Sharp/ReferenceCollection.cs
  80. +8 −3 LibGit2Sharp/ReferenceWrapper.cs
  81. +7 −2 LibGit2Sharp/RemoveFromIndexException.cs
  82. +3 −3 LibGit2Sharp/RenameDetails.cs
  83. +3 −3 LibGit2Sharp/Repository.cs
  84. +7 −1 LibGit2Sharp/RepositoryNotFoundException.cs
  85. +3 −3 LibGit2Sharp/Signature.cs
  86. +4 −4 LibGit2Sharp/SmartSubtransport.cs
  87. +4 −4 LibGit2Sharp/StashCollection.cs
  88. +3 −3 LibGit2Sharp/StatusEntry.cs
  89. +4 −4 LibGit2Sharp/Submodule.cs
  90. +1 −1 LibGit2Sharp/Tree.cs
  91. +2 −2 LibGit2Sharp/TreeChanges.cs
  92. +3 −3 LibGit2Sharp/TreeEntry.cs
  93. +3 −3 LibGit2Sharp/TreeEntryDefinition.cs
  94. +7 −1 LibGit2Sharp/UnbornBranchException.cs
  95. +7 −1 LibGit2Sharp/UnmatchedPathException.cs
  96. +7 −1 LibGit2Sharp/UnmergedIndexEntriesException.cs
  97. +7 −1 LibGit2Sharp/UserCanceledException.cs
  98. +4 −4 LibGit2Sharp/Worktree.cs
  99. +0 −7 NativeLibraryLoadTestApp/Directory.Build.props
  100. +3 −0 TrimmingTestApp/Program.cs
  101. +18 −0 TrimmingTestApp/TrimmingTestApp.csproj
61 changes: 43 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -15,43 +15,58 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3.5.0
uses: actions/checkout@v4.1.2
with:
fetch-depth: 0
- name: Install .NET SDK
uses: actions/setup-dotnet@v3.0.3
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Build
run: dotnet build LibGit2Sharp.sln --configuration Release
- name: Upload packages
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4.3.1
with:
name: NuGet packages
path: bin/Packages/
path: artifacts/package/
retention-days: 7
- name: Verify trimming compatibility
run: dotnet publish TrimmingTestApp
test:
name: Test / ${{ matrix.os }} / ${{ matrix.arch }} / ${{ matrix.tfm }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
arch: [ amd64 ]
os: [ windows-2019, macos-11 ]
tfm: [ net472, net6.0, net7.0 ]
arch: [ x64 ]
os: [ windows-2019, windows-2022, macos-11, macos-12, macos-13 ]
tfm: [ net472, net6.0, net8.0 ]
exclude:
- os: macos-11
tfm: net472
- os: macos-11
tfm: net8.0
- os: macos-12
tfm: net472
- os: macos-13
tfm: net472
include:
- arch: arm64
os: macos-14
tfm: net6.0
- arch: arm64
os: macos-14
tfm: net8.0
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3.5.0
uses: actions/checkout@v4.1.2
with:
fetch-depth: 0
- name: Install .NET SDK
uses: actions/setup-dotnet@v3.0.3
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: |
7.0.x
8.0.x
6.0.x
- name: Run ${{ matrix.tfm }} tests
run: dotnet test LibGit2Sharp.sln --configuration Release --framework ${{ matrix.tfm }} --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
@@ -62,22 +77,32 @@ jobs:
matrix:
arch: [ amd64 ]
# arch: [ amd64, arm64 ]
distro: [ alpine.3.13, alpine.3.14, alpine.3.15, alpine.3.16, alpine.3.17, centos.stream.8, debian.10, debian.11, fedora.36, ubuntu.18.04, ubuntu.20.04, ubuntu.22.04 ]
sdk: [ '6.0', '7.0' ]
distro: [ alpine.3.13, alpine.3.14, alpine.3.15, alpine.3.16, alpine.3.17, alpine.3.18, centos.stream.8, debian.10, debian.11, fedora.36, fedora.37, ubuntu.18.04, ubuntu.20.04, ubuntu.22.04 ]
sdk: [ '6.0', '8.0' ]
exclude:
- distro: alpine.3.13
sdk: '7.0'
sdk: '8.0'
- distro: alpine.3.14
sdk: '7.0'
sdk: '8.0'
- distro: alpine.3.15
sdk: '8.0'
- distro: alpine.3.16
sdk: '8.0'
- distro: debian.10
sdk: '8.0'
- distro: fedora.36
sdk: '8.0'
- distro: ubuntu.18.04
sdk: '8.0'
include:
- sdk: '6.0'
tfm: net6.0
- sdk: '7.0'
tfm: net7.0
- sdk: '8.0'
tfm: net8.0
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3.5.0
uses: actions/checkout@v4.1.2
with:
fetch-depth: 0
- name: Setup QEMU
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -38,5 +38,5 @@ _ReSharper*/
*.DotSettings

_NCrunch_LibGit2Sharp/
packages/
artifacts/
worktree.playlist
9 changes: 8 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# LibGit2Sharp Changes

## v0.30 - ([diff](https://github.com/libgit2/libgit2sharp/compare/0.29.0..0.30.0))

### Changes
- This release includes [libgit2 v1.7.2](https://github.com/libgit2/libgit2/releases/tag/v1.7.2).
- Updates for trimming compatibility [#2084](https://github.com/libgit2/libgit2sharp/pull/2084)
- Updates for .NET 8 [#2085](https://github.com/libgit2/libgit2sharp/pull/2085)

## v0.29 - ([diff](https://github.com/libgit2/libgit2sharp/compare/0.28.0..0.29.0))

### Changes
@@ -8,7 +15,7 @@

### Additions
- Add proxy options [#2065](https://github.com/libgit2/libgit2sharp/pull/2065)
- See PR for details, including some breaking changes to `CloneOptions` and `SubmoduleUpdateOptions`
- See PR for details, including some breaking changes to `CloneOptions` and `SubmoduleUpdateOptions`

## v0.28 - ([diff](https://github.com/libgit2/libgit2sharp/compare/0.27.2..0.28.0))

5 changes: 2 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project>

<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>$(MSBuildThisFileDirectory)bin\$(MSBuildProjectName)\$(Configuration)\</OutputPath>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\Packages\</PackageOutputPath>
<UseArtifactsOutput>true</UseArtifactsOutput>
<DefineConstants Condition=" '$(ExtraDefine)' != '' ">$(DefineConstants);$(ExtraDefine)</DefineConstants>
</PropertyGroup>

5 changes: 2 additions & 3 deletions LibGit2Sharp.Tests/BranchFixture.cs
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
using System.Linq;
using LibGit2Sharp.Tests.TestHelpers;
using Xunit;
using Xunit.Extensions;

namespace LibGit2Sharp.Tests
{
@@ -103,7 +102,7 @@ public void CanCreateAnUnbornBranch()
public void CanCreateBranchUsingAbbreviatedSha()
{
string path = SandboxBareTestRepo();
using (var repo = new Repository(path, new RepositoryOptions{ Identity = Constants.Identity }))
using (var repo = new Repository(path, new RepositoryOptions { Identity = Constants.Identity }))
{
EnableRefLog(repo);

@@ -1001,7 +1000,7 @@ public void OnlyOneBranchIsTheHead()
continue;
}

Assert.True(false, string.Format("Both '{0}' and '{1}' appear to be Head.", head.CanonicalName, branch.CanonicalName));
Assert.Fail(string.Format("Both '{0}' and '{1}' appear to be Head.", head.CanonicalName, branch.CanonicalName));
}

Assert.NotNull(head);
2 changes: 1 addition & 1 deletion LibGit2Sharp.Tests/CloneFixture.cs
Original file line number Diff line number Diff line change
@@ -267,7 +267,7 @@ public void CanInspectCertificateOnClone(string url, string hostname, Type certT
Assert.True(valid);
var x509 = ((CertificateX509)cert).Certificate;
// we get a string with the different fields instead of a structure, so...
Assert.Contains("CN=github.com,", x509.Subject);
Assert.Contains("CN=github.com", x509.Subject);
checksHappy = true;
return false;
}
79 changes: 42 additions & 37 deletions LibGit2Sharp.Tests/CommitFixture.cs
Original file line number Diff line number Diff line change
@@ -3,10 +3,8 @@
using System.IO;
using System.Linq;
using System.Text;
using LibGit2Sharp.Core;
using LibGit2Sharp.Tests.TestHelpers;
using Xunit;
using Xunit.Extensions;

namespace LibGit2Sharp.Tests
{
@@ -150,10 +148,10 @@ public void CanEnumerateCommitsWithReverseTimeSorting()
using (var repo = new Repository(path))
{
foreach (Commit commit in repo.Commits.QueryBy(new CommitFilter
{
IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f",
SortBy = CommitSortStrategies.Time | CommitSortStrategies.Reverse
}))
{
IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f",
SortBy = CommitSortStrategies.Time | CommitSortStrategies.Reverse
}))
{
Assert.NotNull(commit);
Assert.StartsWith(reversedShas[count], commit.Sha);
@@ -170,10 +168,10 @@ public void CanEnumerateCommitsWithReverseTopoSorting()
using (var repo = new Repository(path))
{
List<Commit> commits = repo.Commits.QueryBy(new CommitFilter
{
IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f",
SortBy = CommitSortStrategies.Time | CommitSortStrategies.Reverse
}).ToList();
{
IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f",
SortBy = CommitSortStrategies.Time | CommitSortStrategies.Reverse
}).ToList();
foreach (Commit commit in commits)
{
Assert.NotNull(commit);
@@ -216,10 +214,10 @@ public void CanEnumerateCommitsWithTimeSorting()
using (var repo = new Repository(path))
{
foreach (Commit commit in repo.Commits.QueryBy(new CommitFilter
{
IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f",
SortBy = CommitSortStrategies.Time
}))
{
IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f",
SortBy = CommitSortStrategies.Time
}))
{
Assert.NotNull(commit);
Assert.StartsWith(expectedShas[count], commit.Sha);
@@ -236,10 +234,10 @@ public void CanEnumerateCommitsWithTopoSorting()
using (var repo = new Repository(path))
{
List<Commit> commits = repo.Commits.QueryBy(new CommitFilter
{
IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f",
SortBy = CommitSortStrategies.Topological
}).ToList();
{
IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f",
SortBy = CommitSortStrategies.Topological
}).ToList();
foreach (Commit commit in commits)
{
Assert.NotNull(commit);
@@ -331,9 +329,12 @@ public void CanEnumerateCommitsFromTwoHeads()
public void CanEnumerateCommitsFromMixedStartingPoints()
{
AssertEnumerationOfCommits(
repo => new CommitFilter { IncludeReachableFrom = new object[] { repo.Branches["br2"],
repo => new CommitFilter
{
IncludeReachableFrom = new object[] { repo.Branches["br2"],
"refs/heads/master",
new ObjectId("e90810b8df3e80c413d903f631643c716887138d") } },
new ObjectId("e90810b8df3e80c413d903f631643c716887138d") }
},
new[]
{
"4c062a6", "e90810b", "6dcf9bf", "a4a7dce",
@@ -389,9 +390,9 @@ public void CanEnumerateAllCommits()
{
AssertEnumerationOfCommits(
repo => new CommitFilter
{
IncludeReachableFrom = repo.Refs.OrderBy(r => r.CanonicalName, StringComparer.Ordinal),
},
{
IncludeReachableFrom = repo.Refs.OrderBy(r => r.CanonicalName, StringComparer.Ordinal),
},
new[]
{
"44d5d18", "bb65291", "532740a", "503a16f", "3dfd6fd",
@@ -406,7 +407,7 @@ public void CanEnumerateCommitsFromATagWhichPointsToABlob()
{
AssertEnumerationOfCommits(
repo => new CommitFilter { IncludeReachableFrom = repo.Tags["point_to_blob"] },
new string[] { });
Array.Empty<string>());
}

[Fact]
@@ -421,7 +422,7 @@ public void CanEnumerateCommitsFromATagWhichPointsToATree()

AssertEnumerationOfCommitsInRepo(repo,
r => new CommitFilter { IncludeReachableFrom = tag },
new string[] { });
Array.Empty<string>());
}
}

@@ -680,8 +681,12 @@ public void CanCommitALittleBit()
Assert.Equal(identity.Name, reflogEntry.Committer.Name);
Assert.Equal(identity.Email, reflogEntry.Committer.Email);

var now = DateTimeOffset.Now;
Assert.InRange(reflogEntry.Committer.When, before, now);
// When verifying the timestamp range, give a little more room on the range.
// Git or file system datetime truncation seems to cause these stamps to jump up to a second earlier
// than we expect. See https://github.com/libgit2/libgit2sharp/issues/1764
var low = before - TimeSpan.FromSeconds(1);
var high = DateTimeOffset.Now.TruncateMilliseconds() + TimeSpan.FromSeconds(1);
Assert.InRange(reflogEntry.Committer.When, low, high);

Assert.Equal(commit.Id, reflogEntry.To);
Assert.Equal(ObjectId.Zero, reflogEntry.From);
@@ -859,21 +864,21 @@ public void CanRetrieveChildrenOfASpecificCommit()
const string parentSha = "5b5b025afb0b4c913b4c338a42934a3863bf3644";

var filter = new CommitFilter
{
/* Revwalk from all the refs (git log --all) ... */
IncludeReachableFrom = repo.Refs,
{
/* Revwalk from all the refs (git log --all) ... */
IncludeReachableFrom = repo.Refs,

/* ... and stop when the parent is reached */
ExcludeReachableFrom = parentSha
};
/* ... and stop when the parent is reached */
ExcludeReachableFrom = parentSha
};

var commits = repo.Commits.QueryBy(filter);

var children = from c in commits
from p in c.Parents
let pId = p.Id
where pId.Sha == parentSha
select c;
from p in c.Parents
let pId = p.Id
where pId.Sha == parentSha
select c;

var expectedChildren = new[] { "c47800c7266a2be04c571c04d5a6614691ea99bd",
"4a202b346bb0fb0db7eff3cffeb3c70babbd2045" };
4 changes: 2 additions & 2 deletions LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ namespace LibGit2Sharp.Tests
{
public class DiffTreeToTreeFixture : BaseFixture
{
private static readonly string subBranchFilePath = String.Join("/", "1", "branch_file.txt");
private static readonly string subBranchFilePath = string.Join("/", "1", "branch_file.txt");

[Fact]
public void ComparingATreeAgainstItselfReturnsNoDifference()
@@ -27,7 +27,7 @@ public void ComparingATreeAgainstItselfReturnsNoDifference()
using (var patch = repo.Diff.Compare<Patch>(tree, tree))
{
Assert.Empty(patch);
Assert.Equal(String.Empty, patch);
Assert.Equal(string.Empty, patch);
}
}
}
Loading