Skip to content

Commit 2ead770

Browse files
committed
Merge pull request #1264 from libgit2/cmn/update-libgit2
Update to libgit2 68ad315
2 parents cf6a3c5 + 35e8fa7 commit 2ead770

File tree

7 files changed

+19
-15
lines changed

7 files changed

+19
-15
lines changed

LibGit2Sharp.Tests/NetworkFixture.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public void CanPruneRefs()
278278

279279
using (var repo = new Repository(clonedRepoPath))
280280
{
281-
repo.Network.Remotes.Add("pruner", "file://" + clonedRepoPath2);
281+
repo.Network.Remotes.Add("pruner", clonedRepoPath2);
282282
var remote = repo.Network.Remotes["pruner"];
283283
repo.Network.Fetch(remote);
284284
Assert.NotNull(repo.Refs["refs/remotes/pruner/master"]);

LibGit2Sharp/BlameHunk.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ internal BlameHunk(IRepository repository, GitBlameHunk rawHunk)
2929
{
3030
InitialPath = LaxUtf8Marshaler.FromNative(rawHunk.OrigPath);
3131
}
32-
LineCount = rawHunk.LinesInHunk;
32+
LineCount = rawHunk.LinesInHunk.ConvertToInt();
3333

3434
// Libgit2's line numbers are 1-based
35-
FinalStartLineNumber = rawHunk.FinalStartLineNumber - 1;
36-
InitialStartLineNumber = rawHunk.OrigStartLineNumber - 1;
35+
FinalStartLineNumber = rawHunk.FinalStartLineNumber.ConvertToInt() - 1;
36+
InitialStartLineNumber = rawHunk.OrigStartLineNumber.ConvertToInt() - 1;
3737

3838
// Signature objects need to have ownership of their native pointers
3939
if (rawHunk.FinalSignature != IntPtr.Zero)

LibGit2Sharp/BlameHunkCollection.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ internal BlameHunkCollection(Repository repo, RepositorySafeHandle repoHandle, s
2828
{
2929
version = 1,
3030
flags = options.Strategy.ToGitBlameOptionFlags(),
31-
MinLine = (uint)options.MinLine,
32-
MaxLine = (uint)options.MaxLine,
31+
MinLine = new UIntPtr((uint)options.MinLine),
32+
MaxLine = new UIntPtr((uint)options.MaxLine),
3333
};
3434

3535
if (options.StartingAt != null)

LibGit2Sharp/Core/GitBlame.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ internal class GitBlameOptions
4848
public UInt16 MinMatchCharacters;
4949
public GitOid NewestCommit;
5050
public GitOid OldestCommit;
51-
public uint MinLine;
52-
public uint MaxLine;
51+
public UIntPtr MinLine;
52+
public UIntPtr MaxLine;
5353
}
5454

5555
[StructLayout(LayoutKind.Sequential)]
5656
internal class GitBlameHunk
5757
{
58-
public ushort LinesInHunk;
58+
public UIntPtr LinesInHunk;
5959

6060
public GitOid FinalCommitId;
61-
public ushort FinalStartLineNumber;
61+
public UIntPtr FinalStartLineNumber;
6262
public IntPtr FinalSignature;
6363

6464
public GitOid OrigCommitId;
6565
public IntPtr OrigPath;
66-
public ushort OrigStartLineNumber;
66+
public UIntPtr OrigStartLineNumber;
6767
public IntPtr OrigSignature;
6868

6969
public byte Boundary;

LibGit2Sharp/Core/GitRebaseOptions.cs

+4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ internal class GitRebaseOptions
1010

1111
public int quiet;
1212

13+
public int inmemory;
14+
1315
public IntPtr rewrite_notes_ref;
1416

17+
public GitMergeOpts merge_options = new GitMergeOpts { Version = 1 };
18+
1519
public GitCheckoutOpts checkout_options = new GitCheckoutOpts { version = 1 };
1620
}
1721
}

LibGit2Sharp/LibGit2Sharp.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.119\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.119\build\LibGit2Sharp.NativeBinaries.props')" />
3+
<Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.126\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.126\build\LibGit2Sharp.NativeBinaries.props')" />
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -403,9 +403,9 @@
403403
</PropertyGroup>
404404
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
405405
<PropertyGroup>
406-
<ErrorText>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}.</ErrorText>
406+
<ErrorText>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}.</ErrorText>
407407
</PropertyGroup>
408-
<Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.119\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.119\build\LibGit2Sharp.NativeBinaries.props'))" />
408+
<Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.126\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.126\build\LibGit2Sharp.NativeBinaries.props'))" />
409409
</Target>
410410
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
411411
Other similar extension points exist, see Microsoft.Common.targets.

LibGit2Sharp/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="LibGit2Sharp.NativeBinaries" version="1.0.119" targetFramework="net4" allowedVersions="[1.0.119]" />
3+
<package id="LibGit2Sharp.NativeBinaries" version="1.0.126" targetFramework="net4" allowedVersions="[1.0.126]" />
44
</packages>

0 commit comments

Comments
 (0)