8000 Update libgit2 binaries to eef7e80 · JanKrivanek/libgit2sharp@ce5ccef · GitHub
[go: up one dir, main page]

Skip to content

Commit ce5ccef

Browse files
author
Edward Thomson
committed
Update libgit2 binaries to eef7e80
libgit2/libgit2@40a6051...eef7e80
1 parent 4606cf0 commit ce5ccef

File tree

18 files changed

+62
-48
lines changed

18 files changed

+62
-48
lines changed

Lib/NativeBinaries/amd64/git2.dll

-310 KB
Binary file not shown.

Lib/NativeBinaries/amd64/git2.pdb

-1010 KB
Binary file not shown.

Lib/NativeBinaries/x86/git2.dll

-240 KB
Binary file not shown.

Lib/NativeBinaries/x86/git2.pdb

-344 KB
Binary file not shown.

LibGit2Sharp.Tests/CloneFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void CallsProgressCallbacks(string url)
103103

104104
var scd = BuildSelfCleaningDirectory();
105105
using (Repository repo = Repository.Clone(url, scd.RootedDirectoryPath,
106-
onTransferProgress: (_) => transferWasCalled = true,
106+
onTransferProgress: (_) => { transferWasCalled = true; return 0; },
107107
onCheckoutProgress: (a, b, c) => checkoutWasCalled = true))
108108
{
109109
Assert.True(transferWasCalled);

LibGit2Sharp/Branch.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,7 @@ private string RemoteNameFromLocalBranch()
216216

217217
private string RemoteNameFromRemoteTrackingBranch()
218218
{
219-
using (ReferenceSafeHandle branchPtr = repo.Refs.RetrieveReferencePtr(CanonicalName))
220-
{
221-
return Proxy.git_branch_remote_name(repo.Handle, branchPtr);
222-
}
219+
return Proxy.git_branch_remote_name(repo.Handle, CanonicalName);
223220
}
224221

225222
/// <summary>

LibGit2Sharp/BranchCollection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ public virtual Branch Move(Branch branch, string newName, bool allowOverwrite =
184184

185185
using (ReferenceSafeHandle referencePtr = repo.Refs.RetrieveReferencePtr("refs/heads/" + branch.Name))
186186
{
187-
Proxy.git_branch_move(referencePtr, newName, allowOverwrite);
187+
using (ReferenceSafeHandle ref_out = Proxy.git_branch_move(referencePtr, newName, allowOverwrite))
188+
{
189+
}
188190
}
189191

190192
return this[newName];

LibGit2Sharp/BranchUpdater.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,7 @@ private void GetUpstreamInformation(string canonicalName, out string remoteName,
108108
}
109109
else if (canonicalName.StartsWith(remotePrefix, StringComparison.Ordinal))
110110
{
111-
using (ReferenceSafeHandle branchPtr = repo.Refs.RetrieveReferencePtr(canonicalName))
112-
{
113-
remoteName = Proxy.git_branch_remote_name(repo.Handle, branchPtr);
114-
}
111+
remoteName = Proxy.git_branch_remote_name(repo.Handle, canonicalName);
115112

116113
Remote remote = repo.Network.Remotes.RemoteForName(remoteName);
117114
using (RemoteSafeHandle remoteHandle = Proxy.git_remote_load(repo.Handle, remote.Name, true))

LibGit2Sharp/Core/GitDiff.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,9 @@ public void Dispose()
193193
[Flags]
194194
internal enum GitDiffFileFlags
195195
{
196-
GIT_DIFF_FILE_VALID_OID = (1 << 0),
197-
GIT_DIFF_FILE_FREE_PATH = (1 << 1),
198-
GIT_DIFF_FILE_BINARY = (1 << 2),
199-
GIT_DIFF_FILE_NOT_BINARY = (1 << 3),
200-
GIT_DIFF_FILE_FREE_DATA = (1 << 4),
201-
GIT_DIFF_FILE_UNMAP_DATA = (1 << 5),
196+
GIT_DIFF_FLAG_BINARY = (1 << 0),
197+
GIT_DIFF_FLAG_NOT_BINARY = (1 << 1),
198+
GIT_DIFF_FLAG_VALID_OID = (1 << 2),
202199
}
203200

204201
[StructLayout(LayoutKind.Sequential)]
@@ -218,7 +215,7 @@ internal class GitDiffDelta
218215
public GitDiffFile NewFile;
219216
public ChangeKind Status;
220217
public uint Similarity;
221-
public int Binary;
218+
public uint Flags;
222219
}
223220

224221
[StructLayout(LayoutKind.Sequential)]

LibGit2Sharp/Core/GitDiffExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ internal static class GitDiffExtensions
77
public static bool IsBinary(this GitDiffDelta delta)
88
{
99
//TODO Fix the interop issue on amd64 and use GitDiffDelta.Binary
10-
return delta.OldFile.Flags.HasFlag(GitDiffFileFlags.GIT_DIFF_FILE_BINARY)
11-
|| delta.NewFile.Flags.HasFlag(GitDiffFileFlags.GIT_DIFF_FILE_BINARY);
10+
return delta.OldFile.Flags.HasFlag(GitDiffFileFlags.GIT_DIFF_FLAG_BINARY)
11+
|| delta.NewFile.Flags.HasFlag(GitDiffFileFlags.GIT_DIFF_FLAG_BINARY);
1212
}
1313
}
1414
}

0 commit comments

Comments
 (0)
0