diff --git a/.nuget/packages.config b/.nuget/packages.config index 0335ab080..57b9c468a 100644 --- a/.nuget/packages.config +++ b/.nuget/packages.config @@ -1,5 +1,5 @@  - - + + diff --git a/.travis.yml b/.travis.yml index 12830d15a..d09406bbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,20 +3,20 @@ language: csharp mono: - - 3.12.0 - - 4.2.3 + - 4.8.0 os: - osx - linux -# The newer image cannot find mono 3.12 in the PATH -osx_image: xcode6.4 - env: global: - MONO_OPTIONS=--debug +install: + - curl -L -o nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe + - mono nuget.exe restore LibGit2Sharp.sln + before_install: - date -u - uname -a @@ -31,8 +31,8 @@ script: # Only watch the development branch branches: only: - - vNext - master + - /^maint.*/ # Notify of build changes notifications: diff --git a/CHANGES.md b/CHANGES.md index 4d880fdc5..790f7a84f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,7 +10,7 @@ - Windows (x86/amd64): - Linux/Mac OS X: -## v0.23 + 1 +## v0.24 + 1 ### Additions @@ -18,6 +18,14 @@ ### Fixes +## v0.24 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.23..v0.24)) + +This is the last release before a moving to .NET Core compatible library. + +It will be the last supported release with the prior architecture; as a +result, this release is primarily bugfixes and does not include major new +APIs. + ## v0.23 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.22..v0.23)) ### Additions diff --git a/CI/build.msbuild b/CI/build.msbuild index ad2b5f573..d4b0faae4 100644 --- a/CI/build.msbuild +++ b/CI/build.msbuild @@ -6,7 +6,7 @@ $(RootDir)\Build - diff --git a/Lib/NuGet/NuGet.exe b/Lib/NuGet/NuGet.exe index 9ca66594f..66794573f 100644 Binary files a/Lib/NuGet/NuGet.exe and b/Lib/NuGet/NuGet.exe differ diff --git a/LibGit2Sharp.Tests/CheckoutFixture.cs b/LibGit2Sharp.Tests/CheckoutFixture.cs index 4a85982e6..0648ded10 100644 --- a/LibGit2Sharp.Tests/CheckoutFixture.cs +++ b/LibGit2Sharp.Tests/CheckoutFixture.cs @@ -97,7 +97,7 @@ public void CanCheckoutAnExistingBranchByName(string branchName) [Theory] [InlineData("6dcf9bf", true, "6dcf9bf")] - [InlineData("refs/tags/lw", true, "refs/tags/lw")] + [InlineData("refs/tags/lw", true, "lw")] [InlineData("HEAD~2", true, "HEAD~2")] [InlineData("6dcf9bf", false, "6dcf9bf7541ee10456529833502442f385010c3d")] [InlineData("refs/tags/lw", false, "e90810b8df3e80c413d903f631643c716887138d")] @@ -748,7 +748,7 @@ public void CheckingOutABranchDoesNotAlterBinaryFiles() [Theory] [InlineData("a447ba2ca8")] - [InlineData("refs/tags/lw")] + [InlineData("lw")] [InlineData("e90810^{}")] public void CheckoutFromDetachedHead(string commitPointer) { diff --git a/LibGit2Sharp.Tests/ConfigurationFixture.cs b/LibGit2Sharp.Tests/ConfigurationFixture.cs index 7edc6dab3..3e071c3b7 100644 --- a/LibGit2Sharp.Tests/ConfigurationFixture.cs +++ b/LibGit2Sharp.Tests/ConfigurationFixture.cs @@ -366,7 +366,7 @@ public static IEnumerable ConfigAccessors } } - [Theory, PropertyData("ConfigAccessors")] + [Theory, MemberData(nameof(ConfigAccessors))] public void CanAccessConfigurationWithoutARepository(Func localConfigurationPathProvider) { var path = SandboxStandardTestRepoGitDir(); diff --git a/LibGit2Sharp.Tests/ConflictFixture.cs b/LibGit2Sharp.Tests/ConflictFixture.cs index 10d498500..cabf4a4cf 100644 --- a/LibGit2Sharp.Tests/ConflictFixture.cs +++ b/LibGit2Sharp.Tests/ConflictFixture.cs @@ -112,7 +112,7 @@ public void CanGetOriginalNamesOfRenameConflicts() } } - [Theory, PropertyData("ConflictData")] + [Theory, MemberData(nameof(ConflictData))] public void CanRetrieveSingleConflictByPath(string filepath, string ancestorId, string ourId, string theirId) { var path = SandboxMergedTestRepo(); diff --git a/LibGit2Sharp.Tests/IndexFixture.cs b/LibGit2Sharp.Tests/IndexFixture.cs index cd23df948..63dc91103 100644 --- a/LibGit2Sharp.Tests/IndexFixture.cs +++ b/LibGit2Sharp.Tests/IndexFixture.cs @@ -158,28 +158,34 @@ public void CanMoveAnExistingFileOverANonExistingFile(string sourcePath, FileSta } [Theory] - [InlineData("README", FileStatus.Unaltered, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt" })] - [InlineData("new_tracked_file.txt", FileStatus.NewInIndex, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt" })] - [InlineData("modified_staged_file.txt", FileStatus.ModifiedInIndex, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt" })] - [InlineData("modified_unstaged_file.txt", FileStatus.ModifiedInWorkdir, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt" })] - public void MovingOverAnExistingFileThrows(string sourcePath, FileStatus sourceStatus, IEnumerable destPaths) + [InlineData("README", FileStatus.Unaltered)] + [InlineData("new_tracked_file.txt", FileStatus.NewInIndex)] + [InlineData("modified_staged_file.txt", FileStatus.ModifiedInIndex)] + [InlineData("modified_unstaged_file.txt", FileStatus.ModifiedInWorkdir)] + public void MovingOverAnExistingFileThrows(string sourcePath, FileStatus sourceStatus) { + var destPaths = new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt" }; + InvalidMoveUseCases(sourcePath, sourceStatus, destPaths); } [Theory] - [InlineData("new_untracked_file.txt", FileStatus.NewInWorkdir, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" })] - public void MovingAFileWichIsNotUnderSourceControlThrows(string sourcePath, FileStatus sourceStatus, IEnumerable destPaths) + [InlineData("new_untracked_file.txt", FileStatus.NewInWorkdir)] + public void MovingAFileWichIsNotUnderSourceControlThrows(string sourcePath, FileStatus sourceStatus) { + var destPaths = new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" }; + InvalidMoveUseCases(sourcePath, sourceStatus, destPaths); } [Theory] - [InlineData("deleted_unstaged_file.txt", FileStatus.DeletedFromWorkdir, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" })] - [InlineData("deleted_staged_file.txt", FileStatus.DeletedFromIndex, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" })] - [InlineData("i_dont_exist.txt", FileStatus.Nonexistent, new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" })] - public void MovingAFileNotInTheWorkingDirectoryThrows(string sourcePath, FileStatus sourceStatus, IEnumerable destPaths) + [InlineData("deleted_unstaged_file.txt", FileStatus.DeletedFromWorkdir)] + [InlineData("deleted_staged_file.txt", FileStatus.DeletedFromIndex)] + [InlineData("i_dont_exist.txt", FileStatus.Nonexistent)] + public void MovingAFileNotInTheWorkingDirectoryThrows(string sourcePath, FileStatus sourceStatus) { + var destPaths = new[] { "README", "new_tracked_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", "new_untracked_file.txt", "deleted_unstaged_file.txt", "deleted_staged_file.txt", "i_dont_exist.txt" }; + InvalidMoveUseCases(sourcePath, sourceStatus, destPaths); } diff --git a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj index 0be3440c6..eee61b802 100644 --- a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj +++ b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj @@ -1,6 +1,6 @@  - - + + Debug AnyCPU @@ -11,9 +11,11 @@ Properties LibGit2Sharp.Tests LibGit2Sharp.Tests - v4.0 + v4.6 512 + + true @@ -24,6 +26,7 @@ prompt 4 true + false pdbonly @@ -33,20 +36,36 @@ prompt 4 true + false - - ..\packages\Moq.4.2.1507.0118\lib\net40\Moq.dll + + ..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll + + + ..\packages\Moq.4.7.8\lib\net45\Moq.dll - - False - ..\packages\xunit.1.9.2\lib\net20\xunit.dll + + ..\packages\Validation.2.4.15\lib\net45\Validation.dll + + + ..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll + True + + + ..\packages\xunit.assert.2.2.0\lib\netstandard1.1\xunit.assert.dll + + + ..\packages\xunit.extensibility.core.2.2.0\lib\netstandard1.1\xunit.core.dll + + + ..\packages\xunit.extensibility.execution.2.2.0\lib\net452\xunit.execution.desktop.dll - - ..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + ..\packages\Xunit.SkippableFact.1.3.1\lib\net452\Xunit.SkippableFact.dll @@ -130,7 +149,6 @@ - @@ -156,9 +174,9 @@ - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - +