From 35e8fa728d3258391349eafacbe1975c428d930f Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 25 Feb 2016 15:23:08 -0800 Subject: [PATCH] Update to libgit2 68ad315 --- LibGit2Sharp.Tests/NetworkFixture.cs | 2 +- LibGit2Sharp/BlameHunk.cs | 6 +++--- LibGit2Sharp/BlameHunkCollection.cs | 4 ++-- LibGit2Sharp/Core/GitBlame.cs | 10 +++++----- LibGit2Sharp/Core/GitRebaseOptions.cs | 4 ++++ LibGit2Sharp/LibGit2Sharp.csproj | 6 +++--- LibGit2Sharp/packages.config | 2 +- 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/LibGit2Sharp.Tests/NetworkFixture.cs b/LibGit2Sharp.Tests/NetworkFixture.cs index 53a443469..dd5350b56 100644 --- a/LibGit2Sharp.Tests/NetworkFixture.cs +++ b/LibGit2Sharp.Tests/NetworkFixture.cs @@ -278,7 +278,7 @@ public void CanPruneRefs() using (var repo = new Repository(clonedRepoPath)) { - repo.Network.Remotes.Add("pruner", "file://" + clonedRepoPath2); + repo.Network.Remotes.Add("pruner", clonedRepoPath2); var remote = repo.Network.Remotes["pruner"]; repo.Network.Fetch(remote); Assert.NotNull(repo.Refs["refs/remotes/pruner/master"]); diff --git a/LibGit2Sharp/BlameHunk.cs b/LibGit2Sharp/BlameHunk.cs index 93d711c7a..7f05a0b30 100644 --- a/LibGit2Sharp/BlameHunk.cs +++ b/LibGit2Sharp/BlameHunk.cs @@ -29,11 +29,11 @@ internal BlameHunk(IRepository repository, GitBlameHunk rawHunk) { InitialPath = LaxUtf8Marshaler.FromNative(rawHunk.OrigPath); } - LineCount = rawHunk.LinesInHunk; + LineCount = rawHunk.LinesInHunk.ConvertToInt(); // Libgit2's line numbers are 1-based - FinalStartLineNumber = rawHunk.FinalStartLineNumber - 1; - InitialStartLineNumber = rawHunk.OrigStartLineNumber - 1; + FinalStartLineNumber = rawHunk.FinalStartLineNumber.ConvertToInt() - 1; + InitialStartLineNumber = rawHunk.OrigStartLineNumber.ConvertToInt() - 1; // Signature objects need to have ownership of their native pointers if (rawHunk.FinalSignature != IntPtr.Zero) diff --git a/LibGit2Sharp/BlameHunkCollection.cs b/LibGit2Sharp/BlameHunkCollection.cs index 35b945523..ef647eb37 100644 --- a/LibGit2Sharp/BlameHunkCollection.cs +++ b/LibGit2Sharp/BlameHunkCollection.cs @@ -28,8 +28,8 @@ internal BlameHunkCollection(Repository repo, RepositorySafeHandle repoHandle, s { version = 1, flags = options.Strategy.ToGitBlameOptionFlags(), - MinLine = (uint)options.MinLine, - MaxLine = (uint)options.MaxLine, + MinLine = new UIntPtr((uint)options.MinLine), + MaxLine = new UIntPtr((uint)options.MaxLine), }; if (options.StartingAt != null) diff --git a/LibGit2Sharp/Core/GitBlame.cs b/LibGit2Sharp/Core/GitBlame.cs index 9db27d25e..b14632c40 100644 --- a/LibGit2Sharp/Core/GitBlame.cs +++ b/LibGit2Sharp/Core/GitBlame.cs @@ -48,22 +48,22 @@ internal class GitBlameOptions public UInt16 MinMatchCharacters; public GitOid NewestCommit; public GitOid OldestCommit; - public uint MinLine; - public uint MaxLine; + public UIntPtr MinLine; + public UIntPtr MaxLine; } [StructLayout(LayoutKind.Sequential)] internal class GitBlameHunk { - public ushort LinesInHunk; + public UIntPtr LinesInHunk; public GitOid FinalCommitId; - public ushort FinalStartLineNumber; + public UIntPtr FinalStartLineNumber; public IntPtr FinalSignature; public GitOid OrigCommitId; public IntPtr OrigPath; - public ushort OrigStartLineNumber; + public UIntPtr OrigStartLineNumber; public IntPtr OrigSignature; public byte Boundary; diff --git a/LibGit2Sharp/Core/GitRebaseOptions.cs b/LibGit2Sharp/Core/GitRebaseOptions.cs index 2a0a65e42..3ae4e0ed1 100644 --- a/LibGit2Sharp/Core/GitRebaseOptions.cs +++ b/LibGit2Sharp/Core/GitRebaseOptions.cs @@ -10,8 +10,12 @@ internal class GitRebaseOptions public int quiet; + public int inmemory; + public IntPtr rewrite_notes_ref; + public GitMergeOpts merge_options = new GitMergeOpts { Version = 1 }; + public GitCheckoutOpts checkout_options = new GitCheckoutOpts { version = 1 }; } } diff --git a/LibGit2Sharp/LibGit2Sharp.csproj b/LibGit2Sharp/LibGit2Sharp.csproj index 187b4202a..ee5e0c423 100644 --- a/LibGit2Sharp/LibGit2Sharp.csproj +++ b/LibGit2Sharp/LibGit2Sharp.csproj @@ -1,6 +1,6 @@  - + Debug AnyCPU @@ -403,9 +403,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}. - +