Skip to content

Commit 17a2dee

Browse files
authored
Merge pull request #2131 from libgit2/libgit2-184
Update LibGit2Sharp.NativeBinaries to 2.0.323
2 parents 19236db + 8ef523d commit 17a2dee

8 files changed

+25
-21
lines changed

LibGit2Sharp.Tests/CloneFixture.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public void CanClone(string url)
3636
}
3737

3838
[Theory]
39-
[InlineData("https://github.com/libgit2/TestGitRepository",1)]
40-
[InlineData("https://github.com/libgit2/TestGitRepository",5)]
41-
[InlineData("https://github.com/libgit2/TestGitRepository",7)]
39+
[InlineData("https://github.com/libgit2/TestGitRepository", 1)]
40+
[InlineData("https://github.com/libgit2/TestGitRepository", 5)]
41+
[InlineData("https://github.com/libgit2/TestGitRepository", 7)]
4242
public void CanCloneShallow(string url, int depth)
4343
{
4444
var scd = BuildSelfCleaningDirectory();
@@ -266,7 +266,7 @@ static Credentials CreateUsernamePasswordCredentials(string user, string pass, b
266266

267267
[SkippableTheory]
268268
[InlineData("https://github.com/libgit2/TestGitRepository.git", "github.com", typeof(CertificateX509))]
269-
[InlineData("[email protected]:libgit2/TestGitRepository.git", "github.com", typeof(CertificateSsh))]
269+
//[InlineData("[email protected]:libgit2/TestGitRepository.git", "github.com", typeof(CertificateSsh))]
270270
public void CanInspectCertificateOnClone(string url, string hostname, Type certType)
271271
{
272272
var scd = BuildSelfCleaningDirectory();

LibGit2Sharp.Tests/GlobalSettingsFixture.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ public void SetExtensions()
9090
var extensions = GlobalSettings.GetExtensions();
9191

9292
// Assert that "noop" is supported by default
93-
Assert.Equal(new[] { "noop", "objectformat" }, extensions);
93+
Assert.Equal(new[] { "noop", "objectformat", "worktreeconfig" }, extensions);
9494

9595
// Disable "noop" extensions
9696
GlobalSettings.SetExtensions("!noop");
9797
extensions = GlobalSettings.GetExtensions();
98-
Assert.Equal(new[] { "objectformat" }, extensions);
98+
Assert.Equal(new[] { "objectformat", "worktreeconfig" }, extensions);
9999

100100
// Enable two new extensions (it will reset the configuration and "noop" will be enabled)
101101
GlobalSettings.SetExtensions("partialclone", "newext");
102102
extensions = GlobalSettings.GetExtensions();
103-
Assert.Equal(new[] { "newext", "noop", "objectformat", "partialclone" }, extensions);
103+
Assert.Equal(new[] { "newext", "noop", "objectformat", "partialclone", "worktreeconfig" }, extensions);
104104
}
105105
}
106106
}

LibGit2Sharp/ConfigurationLevel.cs

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
/// </summary>
66
public enum ConfigurationLevel
77
{
8+
/// <summary>
9+
/// Worktree specific configuration file; $GIT_DIR/config.worktree
10+
/// </summary>
11+
Worktree = 6,
12+
813
/// <summary>
914
/// The local .git/config of the current repository.
1015
/// </summary>

LibGit2Sharp/Core/GitConfigEntry.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using System.Runtime.InteropServices;
32

43
namespace LibGit2Sharp.Core
@@ -8,9 +7,10 @@ internal unsafe struct GitConfigEntry
87
{
98
public char* namePtr;
109
public char* valuePtr;
10+
public char* backend_type;
11+
public char* origin_path;
1112
public uint include_depth;
1213
public uint level;
1314
public void* freePtr;
14-
public void* payloadPtr;
1515
}
1616
}

LibGit2Sharp/Core/GitPushOptions.cs

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ internal class GitPushOptions
1111
public GitProxyOptions ProxyOptions;
1212
public RemoteRedirectMode FollowRedirects = RemoteRedirectMode.Initial;
1313
public GitStrArrayManaged CustomHeaders;
14+
public GitStrArrayManaged remote_push_options;
1415
}
1516
}

LibGit2Sharp/Core/GitWorktree.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.Runtime.InteropServices;
4-
using System.Text;
53

64
namespace LibGit2Sharp.Core
75
{
@@ -36,6 +34,8 @@ internal class git_worktree_add_options
3634

3735
public int locked;
3836

37+
public int checkout_existing;
38+
3939
public IntPtr @ref = IntPtr.Zero;
4040

4141
public GitCheckoutOpts checkoutOpts = new GitCheckoutOpts { version = 1 };

LibGit2Sharp/LibGit2Sharp.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</PropertyGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[2.0.322]" PrivateAssets="none" />
32+
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[2.0.323]" PrivateAssets="none" />
3333
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="all" />
3434
</ItemGroup>
3535

LibGit2Sharp/WorktreeCollection.cs

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
using LibGit2Sharp.Core;
2-
using LibGit2Sharp.Core.Handles;
3-
using System;
1+
using System;
42
using System.Collections;
53
using System.Collections.Generic;
64
using System.Globalization;
7-
using System.IO;
85
using System.Linq;
9-
using System.Text;
6+
using LibGit2Sharp.Core;
7+
using LibGit2Sharp.Core.Handles;
108

119
namespace LibGit2Sharp
1210
{
@@ -48,7 +46,7 @@ public virtual Worktree this[string name]
4846
}
4947

5048
/// <summary>
51-
///
49+
///
5250
/// </summary>
5351
/// <param name="committishOrBranchSpec"></param>
5452
/// <param name="name"></param>
@@ -89,7 +87,7 @@ public virtual Worktree Add(string committishOrBranchSpec, string name, string p
8987
}
9088

9189
/// <summary>
92-
///
90+
///
9391
/// </summary>
9492
/// <param name="name"></param>
9593
/// <param name="path"></param>
@@ -112,7 +110,7 @@ public virtual Worktree Add(string name, string path, bool isLocked)
112110
}
113111

114112
/// <summary>
115-
///
113+
///
116114
/// </summary>
117115
/// <param name="worktree"></param>
118116
/// <returns></returns>
@@ -122,7 +120,7 @@ public virtual bool Prune(Worktree worktree)
122120
}
123121

124122
/// <summary>
125-
///
123+
///
126124
/// </summary>
127125
/// <param name="worktree"></param>
128126
/// <param name="ifLocked"></param>

0 commit comments

Comments
 (0)