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 0854671

Browse files
committed
Merge pull request libgit2#1197 from libgit2/ntk/upgrade
Update libgit2 to a99f33e
2 parents bd4e4c9 + b9cc9e9 commit 0854671

File tree

9 files changed

+26
-13
lines changed

9 files changed

+26
-13
lines changed

LibGit2Sharp.Tests/LibGit2Sharp.Tests.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\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" />
3+
<Import Project="..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" />
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -157,7 +157,7 @@
157157
<PropertyGroup>
158158
<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>
159159
</PropertyGroup>
160-
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props'))" />
160+
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props'))" />
161161
</Target>
162162
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
163163
Other similar extension points exist, see Microsoft.Common.targets.

LibGit2Sharp.Tests/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<package id="Moq" version="4.2.1507.0118" targetFramework="net40" />
44
<package id="xunit" version="1.9.2" targetFramework="net40" />
55
<package id="xunit.extensions" version="1.9.2" targetFramework="net40" />
6-
<package id="xunit.runner.visualstudio" version="2.0.0" targetFramework="net40" />
6+
<package id="xunit.runner.visualstudio" version="2.1.0" targetFramework="net40" />
77
</packages>

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: 13 additions & 4 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)
@@ -3216,7 +3225,7 @@ private enum LibGitOption
32163225
/// </summary>
32173226
/// <param name="level">The level (global/system/XDG) of the config.</param>
32183227
/// <returns>
3219-
/// The paths delimited by 'GIT_PATH_LIST_SEPARATOR' (<see cref="GlobalSettings.PathListSeparator"/>).
3228+
/// The paths delimited by 'GIT_PATH_LIST_SEPARATOR'.
32203229
/// </returns>
32213230
public static string git_libgit2_opts_get_search_path(ConfigurationLevel level)
32223231
{
@@ -3238,7 +3247,7 @@ public static string git_libgit2_opts_get_search_path(ConfigurationLevel level)
32383247
/// </summary>
32393248
/// <param name="level">The level (global/system/XDG) of the config.</param>
32403249
/// <param name="path">
3241-
/// A string of paths delimited by 'GIT_PATH_LIST_SEPARATOR' (<see cref="GlobalSettings.PathListSeparator"/>).
3250+
/// A string of paths delimited by 'GIT_PATH_LIST_SEPARATOR'.
32423251
/// Pass null to reset the search path to the default.
32433252
/// </param>
32443253
public static void git_libgit2_opts_set_search_path(ConfigurationLevel level, string path)

LibGit2Sharp/GlobalSettings.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Reflection;
5-
using System.Collections.Generic;
65
using LibGit2Sharp.Core;
76

87
namespace LibGit2Sharp

LibGit2Sharp/IDiffResult.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
namespace LibGit2Sharp
22
{
3+
/// <summary>
4+
/// Marker interface to identify Diff results.
5+
/// </summary>
36
public interface IDiffResult
47
{ }
58
}

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)