8000 Update libgit2 binaries to b641c00 · crashsplash/libgit2sharp@efb3ecc · GitHub
[go: up one dir, main page]

Skip to content

Commit efb3ecc

Browse files
yorahnulltoken
authored andcommitted
Update libgit2 binaries to b641c00
libgit2/libgit2@08283cb...b641c00
1 parent 92048f9 commit efb3ecc

File tree

13 files changed

+59
-33
lines changed

13 files changed

+59
-33
lines changed

Lib/NativeBinaries/amd64/git2.dll

33.5 KB
Binary file not shown.

Lib/NativeBinaries/amd64/git2.pdb

120 KB
Binary file not shown.

Lib/NativeBinaries/x86/git2.dll

26 KB
Binary file not shown.

Lib/NativeBinaries/x86/git2.pdb

88 KB
Binary file not shown.

LibGit2Sharp/Branch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ private Branch ResolveTrackedBranch()
245245
return null;
246246
}
247247

248-
string trackedReferenceName = Proxy.git_branch_tracking_name(repo.Handle, CanonicalName);
248+
string trackedReferenceName = Proxy.git_branch_upstream_name(repo.Handle, CanonicalName);
249249

250250
if (trackedReferenceName == null)
251251
{

LibGit2Sharp/Core/GitDiff.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public static GitStrArrayIn BuildFrom(FilePath[] paths)
126126

127127
for (int i = 0; i < nbOfPaths; i++)
128128
{
129-
var s = paths[i];
129+
var s = paths[i].Posix;
130130
pathPtrs[i] = FilePathMarshaler.FromManaged(s);
131131
}
132132

LibGit2Sharp/Core/NativeMethods.cs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ internal static extern int git_branch_remote_name(
176176
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string canonical_branch_name);
177177

178178
[DllImport(libgit2)]
179-
internal static extern int git_branch_tracking_name(
179+
internal static extern int git_branch_upstream_name(
180180
byte[] tracking_branch_name_out, // NB: This is more properly a StringBuilder, but it's UTF8
181181
UIntPtr buffer_size,
182182
RepositorySafeHandle repo,
@@ -415,6 +415,14 @@ internal static extern int git_diff_blobs(
415415
git_diff_data_cb lineCallback,
416416
IntPtr payload);
417417

418+
[DllImport(libgit2)]
419+
internal static extern int git_diff_foreach(
420+
DiffListSafeHandle diff,
421+
git_diff_file_cb fileCallback,
422+
git_diff_hunk_cb hunkCallback,
423+
git_diff_data_cb lineCallback,
424+
IntPtr payload);
425+
418426
[DllImport(libgit2)]
419427
internal static extern int git_graph_ahead_behind(out UIntPtr ahead, out UIntPtr behind, RepositorySafeHandle repo, ref GitOid one, ref GitOid two);
420428

@@ -771,6 +779,9 @@ internal static extern int git_remote_download(
771779
[DllImport(libgit2)]
772780
internal static extern void git_remote_free(IntPtr remote);
773781

782+
[DllImport(libgit2)]
783+
internal static extern GitRefSpecHandle git_remote_get_refspec(RemoteSafeHandle remote, UIntPtr n);
784+
774785
[DllImport(libgit2)]
775786
internal static extern int git_remote_is_valid_name(
776787
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string remote_name);
@@ -786,9 +797,6 @@ internal static extern int git_remote_load(
786797
[DllImport(libgit2)]
787798
internal static extern int git_remote_ls(RemoteSafeHandle remote, git_headlist_cb headlist_cb, IntPtr payload);
788799

789-
[DllImport(libgit2)]
790-
internal static extern GitRefSpecHandle git_remote_fetchspec(RemoteSafeHandle remote);
791-
792800
[DllImport(libgit2)]
793801
[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8NoCleanupMarshaler))]
794802
internal static extern string git_remote_name(RemoteSafeHandle remote);
@@ -815,9 +823,9 @@ internal static extern int git_remote_set_callbacks(
815823
ref GitRemoteCallbacks callbacks);
816824

817825
[DllImport(libgit2)]
818-
internal static extern int git_remote_set_fetchspec(
826+
internal static extern int git_remote_add_fetch(
819827
RemoteSafeHandle remote,
820-
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof (Utf8Marshaler))] string fetchrefspec);
828+
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof (Utf8Marshaler))] string refspec);
821829

822830
internal delegate void remote_progress_callback(IntPtr str, int len, IntPtr data);
823831

LibGit2Sharp/Core/Proxy.cs

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,11 @@ public static string git_branch_remote_name(RepositorySafeHandle repo, string ca
162162
}
163163
}
164164

165-
public static string git_branch_tracking_name(RepositorySafeHandle handle, string canonicalReferenceName)
165+
public static string git_branch_upstream_name(RepositorySafeHandle handle, string canonicalReferenceName)
166166
{
167167
using (ThreadAffinity())
168168
{
169-
int bufSize = NativeMethods.git_branch_tracking_name(
169+
int bufSize = NativeMethods.git_branch_upstream_name(
170170
null, UIntPtr.Zero, handle, canonicalReferenceName);
171171

172172
if (bufSize == (int)GitErrorCode.NotFound)
@@ -178,7 +178,7 @@ public static string git_branch_tracking_name(RepositorySafeHandle handle, strin
178178

179179
var buffer = new byte[bufSize];
180180

181-
int res = NativeMethods.git_branch_tracking_name(
181+
int res = NativeMethods.git_branch_upstream_name(
182182
buffer, (UIntPtr)buffer.Length, handle, canonicalReferenceName);
183183
Ensure.Int32Result(res);
184184

@@ -511,6 +511,19 @@ public static void git_diff_blobs(
511511
}
512512
}
513513

514+
public static void git_diff_foreach(
515+
DiffListSafeHandle diff,
516+
NativeMethods.git_diff_file_cb fileCallback,
517+
NativeMethods.git_diff_hunk_cb hunkCallback,
518+
NativeMethods.git_diff_data_cb dataCallback)
519+
{
520+
using (ThreadAffinity())
521+
{
522+
int res = NativeMethods.git_diff_foreach(diff, fileCallback, hunkCallback, dataCallback, IntPtr.Zero);
523+
Ensure.ZeroResult(res);
524+
}
525+
}
526+
514527
public static DiffListSafeHandle git_diff_tree_to_index(
515528
RepositorySafeHandle repo,
516529
IndexSafeHandle index,
@@ -1385,9 +1398,9 @@ public static void git_remote_disconnect(RemoteSafeHandle remote)
13851398
}
13861399
}
13871400

1388-
public static GitRefSpecHandle git_remote_fetchspec(RemoteSafeHandle remote)
1401+
public static GitRefSpecHandle git_remote_get_refspec(RemoteSafeHandle remote, int n)
13891402
{
1390-
return NativeMethods.git_remote_fetchspec(remote);
1403+
return NativeMethods.git_remote_get_refspec(remote, (UIntPtr)n);
13911404
}
13921405

13931406
public static void git_remote_download(RemoteSafeHandle remote, TransferProgressHandler onTransferProgress)
@@ -1471,11 +1484,11 @@ public static void git_remote_set_autotag(RemoteSafeHandle remote, TagFetchMode
14711484
NativeMethods.git_remote_set_autotag(remote, value);
14721485
}
14731486

1474-
public static void git_remote_set_fetchspec(RemoteSafeHandle remote, string fetchspec)
1487+
public static void git_remote_add_fetch(RemoteSafeHandle remote, string refspec)
14751488
{
14761489
using (ThreadAffinity())
14771490
{
1478-
int res = NativeMethods.git_remote_set_fetchspec(remote, fetchspec);
1491+
int res = NativeMethods.git_remote_add_fetch(remote, refspec);
14791492
Ensure.ZeroResult(res);
14801493
}
14811494
}

LibGit2Sharp/Remote.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ internal string FetchSpecTransformToSource(string reference)
8282
{
8383
using (RemoteSafeHandle remoteHandle = Proxy.git_remote_load(repository.Handle, Name, true))
8484
{
85-
GitRefSpecHandle fetchSpecPtr = Proxy.git_remote_fetchspec(remoteHandle);
85+
GitRefSpecHandle fetchSpecPtr = Proxy.git_remote_get_refspec(remoteHandle, 0);
8686
return Proxy.git_refspec_rtransform(fetchSpecPtr, reference);
8787
}
8888
}

LibGit2Sharp/RemoteCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public virtual Remote Add(string name, string url, string fetchRefSpec)
103103

104104
using (RemoteSafeHandle handle = Proxy.git_remote_create(repository.Handle, name, url))
105105
{
106-
Proxy.git_remote_set_fetchspec(handle, fetchRefSpec);
106+
Proxy.git_remote_add_fetch(handle, fetchRefSpec);
107107
Proxy.git_remote_save(handle);
108108
return Remote.BuildFromPtr(handle, this.repository);
109109
}

0 commit comments

Comments
 (0)
0