Skip to content

Update Dependencies #1509

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

Closed
wants to merge 2 commits into from
Closed
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
14 changes: 9 additions & 5 deletions LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Moq" Version="4.7.99" />
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="Moq" Version="4.7.145" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.skippablefact" Version="1.3.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
<PackageReference Include="xunit.runner.console" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="xunit.runner.console" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="2.0.41" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently in the Directory.Build.props file, so we should either update that one entry, or remove it if we want it in the project files after all.

</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions LibGit2Sharp.Tests/RemoveFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ public class RemoveFixture : BaseFixture
* 'git rm <file>' fails ("error: '<file>' has local modifications").
*/
[InlineData(false, "modified_unstaged_file.txt", false, FileStatus.ModifiedInWorkdir, true, true, FileStatus.NewInWorkdir | FileStatus.DeletedFromIndex)]
[InlineData(true, "modified_unstaged_file.txt", true, FileStatus.ModifiedInWorkdir, true, true, 0)]
[InlineData(true, "modified_unstaged_file.txt", true, FileStatus.ModifiedInWorkdir, true, true, FileStatus.Unaltered)]
/***
* Test case: modified file in wd, the modifications have already been promoted to the index.
* 'git rm --cached <file>' works (removes the file from the index)
* 'git rm <file>' fails ("error: '<file>' has changes staged in the index")
*/
[InlineData(false, "modified_staged_file.txt", false, FileStatus.ModifiedInIndex, true, true, FileStatus.NewInWorkdir | FileStatus.DeletedFromIndex)]
[InlineData(true, "modified_staged_file.txt", true, FileStatus.ModifiedInIndex, true, true, 0)]
[InlineData(true, "modified_staged_file.txt", true, FileStatus.ModifiedInIndex, true, true, FileStatus.Unaltered)]
/***
* Test case: modified file in wd, the modifications have already been promoted to the index, and
* the file does not exist in the HEAD.
* 'git rm --cached <file>' works (removes the file from the index)
* 'git rm <file>' throws ("error: '<file>' has changes staged in the index")
*/
[InlineData(false, "new_tracked_file.txt", false, FileStatus.NewInIndex, true, true, FileStatus.NewInWorkdir)]
[InlineData(true, "new_tracked_file.txt", true, FileStatus.NewInIndex, true, true, 0)]
[InlineData(true, "new_tracked_file.txt", true, FileStatus.NewInIndex, true, true, FileStatus.Unaltered)]
public void CanRemoveAnUnalteredFileFromTheIndexWithoutRemovingItFromTheWorkingDirectory(
bool removeFromWorkdir, string filename, bool throws, FileStatus initialStatus, bool existsBeforeRemove, bool existsAfterRemove, FileStatus lastStatus)
{
Expand Down
6 changes: 5 additions & 1 deletion LibGit2Sharp/LibGit2Sharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@

<ItemGroup>
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[1.0.185]" PrivateAssets="contentFiles" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should go ahead and build a new native binaries package that we can update to as well. 1.0.185 doesn't have all of the changes I made around support netstandard.

<PackageReference Include="SourceLink.Create.GitHub" Version="2.2.0" PrivateAssets="all" />
<PackageReference Include="SourceLink.Create.GitHub" Version="2.5.0" PrivateAssets="all" />
<DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.2.0" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DotNetCliToolReference also needs to be bumped to 2.5.0.

</ItemGroup>

<ItemGroup>
<PackageReference Update="Nerdbank.GitVersioning" Version="2.0.41" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. This is already in the Directory.Build.props file.

I'd say there's an argument that we don't need it there, since this is the only project that actually cares about the version, and having it in the props file means it applies to the test project as well.

If we do keep it here instead, the extra ItemGroup should be removed and it should go up with the other packages above. It also needs PrivateAssets="all" added.

</ItemGroup>

<Import Project="CodeGenerator.targets" />

<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
Expand Down