Skip to content

Bump LibGit2Sharp from 0.27.0-preview-0182 to 0.27.2 #930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<PropertyGroup>
<!-- LibGit2Sharp Native Binary version - used in both main project and Cake addin -->
<LibGit2SharpNativeVersion>2.0.315-alpha.0.9</LibGit2SharpNativeVersion>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)3rdPartyNotices.txt" Pack="true" PackagePath="" />
</ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
<BenchmarkDotNetVersion>0.13.5</BenchmarkDotNetVersion>
<MSBuildPackageVersion>16.9.0</MSBuildPackageVersion>
<MSBuildPackageVersion Condition="'$(IsTestProject)'=='true'">15.9.20</MSBuildPackageVersion>
<!-- LibGit2Sharp Native Binary version - used in both main project and Cake addin -->
<LibGit2SharpNativeVersion>2.0.320</LibGit2SharpNativeVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet.Diagnostics.Windows" Version="$(BenchmarkDotNetVersion)" />
<PackageVersion Include="BenchmarkDotNet" Version="$(BenchmarkDotNetVersion)" />
<PackageVersion Include="Cake.Core" Version="3.0.0" />
<PackageVersion Include="DotNetMDDocs" Version="0.112.39" />
<PackageVersion Include="LibGit2Sharp" Version="0.27.0-preview-0182" />
<PackageVersion Include="LibGit2Sharp" Version="0.27.2" />
<PackageVersion Include="LibGit2Sharp.NativeBinaries" Version="$(LibGit2SharpNativeVersion)" />
<PackageVersion Include="Microsoft.Build.Framework" Version="$(MSBuildPackageVersion)" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.5.5" />
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="$(MSBuildPackageVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<LibGit2SharpNativeBinaries>$(NuGetPackageRoot)libgit2sharp.nativebinaries\$(LibGit2SharpNativeVersion)\</LibGit2SharpNativeBinaries>
<NuspecProperties>$(NuspecProperties);Version=$(Version);commit=$(GitCommitId);BaseOutputPath=$(OutputPath);LibGit2SharpNativeBinaries=$(LibGit2SharpNativeBinaries)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Version=$(Version);commit=$(GitCommitId);BaseOutputPath=$(OutputPath);LibGit2SharpNativeBinaries=$(LibGit2SharpNativeBinaries);libgit2_filename=$(libgit2_filename)</NuspecProperties>
<NuspecProperties Condition=" '$(PackLKG)' == 'true' ">$(NuspecProperties);LKGSuffix=.LKG</NuspecProperties>
</PropertyGroup>
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ IMPORTANT: The 3.x release may produce a different version height than prior maj
<file src="$LibGit2SharpNativeBinaries$runtimes\**" target="build\runtimes\" />

<!-- Additional copies to work around DllNotFoundException on Mono (https://github.com/dotnet/Nerdbank.GitVersioning/issues/222) -->
<file src="$LibGit2SharpNativeBinaries$runtimes\osx-x64\native\libgit2-b7bad55.dylib" target="build\MSBuildFull\lib\osx-x64\libgit2-b7bad55.dylib" />
<file src="$LibGit2SharpNativeBinaries$runtimes\osx-arm64\native\libgit2-b7bad55.dylib" target="build\MSBuildFull\lib\osx-arm64\libgit2-b7bad55.dylib" />
<file src="$LibGit2SharpNativeBinaries$runtimes\linux-x64\native\libgit2-b7bad55.so" target="build\MSBuildFull\lib\linux-x64\libgit2-b7bad55.so" />
<file src="$LibGit2SharpNativeBinaries$runtimes\osx-x64\native\lib$libgit2_filename$.dylib" target="build\MSBuildFull\lib\osx-x64\lib$libgit2_filename$.dylib" />
<file src="$LibGit2SharpNativeBinaries$runtimes\osx-arm64\native\lib$libgit2_filename$.dylib" target="build\MSBuildFull\lib\osx-arm64\lib$libgit2_filename$.dylib" />
<file src="$LibGit2SharpNativeBinaries$runtimes\linux-x64\native\lib$libgit2_filename$.so" target="build\MSBuildFull\lib\linux-x64\lib$libgit2_filename$.so" />

<file src="$LibGit2SharpNativeBinaries$libgit2\LibGit2Sharp.dll.config" target="build\MSBuildCore\LibGit2Sharp.dll.config" />
<file src="$BaseOutputPath$net6.0\LibGit2Sharp.dll" target="build\MSBuildCore\LibGit2Sharp.dll" />
Expand Down
8 changes: 6 additions & 2 deletions test/Nerdbank.GitVersioning.Tests/VersionOracleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -604,16 +604,20 @@ public void Worktree_Support(bool detachedHead)

string workTreePath = this.CreateDirectoryForNewRepo();
Directory.Delete(workTreePath);
Worktree worktree;
if (detachedHead)
{
this.LibGit2Repository.Worktrees.Add("HEAD~1", "myworktree", workTreePath, isLocked: false);
worktree = this.LibGit2Repository.Worktrees.Add("HEAD~1", "myworktree", workTreePath, isLocked: false);
}
else
{
this.LibGit2Repository.Branches.Add("wtbranch", "HEAD~1");
this.LibGit2Repository.Worktrees.Add("wtbranch", "myworktree", workTreePath, isLocked: false);
worktree = this.LibGit2Repository.Worktrees.Add("wtbranch", "myworktree", workTreePath, isLocked: false);
}

// Workaround for https://github.com/libgit2/libgit2sharp/issues/2037
Commands.Checkout(worktree.WorktreeRepository, "HEAD", new CheckoutOptions { CheckoutModifiers = CheckoutModifiers.Force });

GitContext context = this.CreateGitContext(workTreePath);
var oracleWorkTree = new VersionOracle(context);
Assert.Equal(oracleOriginal.Version, oracleWorkTree.Version);
Expand Down