Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Commit 6bc517f

Browse files
committed
Update libgit2 to a99f33e
libgit2/libgit2@6b36945...a99f33e
1 parent d15e27f commit 6bc517f

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

LibGit2Sharp/Core/GitFetchOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ internal class GitFetchOptions
1010
public FetchPruneStrategy Prune;
1111
public bool UpdateFetchHead = true;
1212
public TagFetchMode download_tags;
13+
public GitStrArrayManaged custom_headers;
1314
}
1415
}

LibGit2Sharp/Core/NativeMethods.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,8 @@ internal static extern string git_refspec_src(
10981098
internal static extern int git_remote_connect(
10991099
RemoteSafeHandle remote,
11001100
GitDirection direction,
1101-
ref GitRemoteCallbacks callbacks);
1101+
ref GitRemoteCallbacks callbacks,
1102+
ref GitStrArray custom_headers);
11021103

11031104
[DllImport(libgit2)]
11041105
internal static extern int git_remote_create(

LibGit2Sharp/Core/Proxy.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,8 +1997,17 @@ public static RemoteSafeHandle git_remote_create_anonymous(RepositorySafeHandle
19971997

19981998
public static void git_remote_connect(RemoteSafeHandle remote, GitDirection direction, ref GitRemoteCallbacks remoteCallbacks)
19991999
{
2000-
int res = NativeMethods.git_remote_connect(remote, direction, ref remoteCallbacks);
2001-
Ensure.ZeroResult(res);
2000+
GitStrArrayManaged customHeaders = new GitStrArrayManaged();
2001+
2002+
try
2003+
{
2004+
int res = NativeMethods.git_remote_connect(remote, direction, ref remoteCallbacks, ref customHeaders.Array);
2005+
Ensure.ZeroResult(res);
2006+
}
2007+
catch (Exception)
2008+
{
2009+
customHeaders.Dispose();
2010+
}
20022011
}
20032012

20042013
public static void git_remote_delete(RepositorySafeHandle repo, string name)

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 2 additions & 2 deletions
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.81\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.81\build\LibGit2Sharp.NativeBinaries.props')" />
3+
<Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.86\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.86\build\LibGit2Sharp.NativeBinaries.props')" />
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -403,7 +403,7 @@
403403
<PropertyGroup>
404404
<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>
405405
</PropertyGroup>
406-
<Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.81\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.81\build\LibGit2Sharp.NativeBinaries.props'))" />
406+
<Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.86\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.86\build\LibGit2Sharp.NativeBinaries.props'))" />
407407
</Target>
408408
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
409409
Other similar extension points exist, see Microsoft.Common.targets.

LibGit2Sharp/packages.config

Lines changed: 2 additions & 2 deletions
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.81" targetFramework="net40" allowedVersions="[1.0.81]" />
4-
</packages>
3+
<package id="LibGit2Sharp.NativeBinaries" version="1.0.86" targetFramework="net40" allowedVersions="[1.0.86]" />
4+
</packages>

0 commit comments

Comments
 (0)