Skip to content

Update LibGit2Sharp.NativeBinaries to 2.0.315 #1957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions LibGit2Sharp/Core/GitFetchOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ internal class GitFetchOptions
public bool UpdateFetchHead = true;
public TagFetchMode download_tags;
public GitProxyOptions ProxyOptions;
public RemoteFollowRedirects FollowRedirects;
public GitStrArrayManaged CustomHeaders;
}
}
1 change: 1 addition & 0 deletions LibGit2Sharp/Core/GitPushOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ internal class GitPushOptions
public int PackbuilderDegreeOfParallelism;
public GitRemoteCallbacks RemoteCallbacks;
public GitProxyOptions ProxyOptions;
public RemoteFollowRedirects FollowRedirects;
public GitStrArrayManaged CustomHeaders;
}
}
2 changes: 2 additions & 0 deletions LibGit2Sharp/Core/GitStatusOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ internal class GitStatusOptions : IDisposable

public IntPtr Baseline = IntPtr.Zero;

public ushort RenameThreshold = 50;

public void Dispose()
{
PathSpec.Dispose();
Expand Down
4 changes: 2 additions & 2 deletions LibGit2Sharp/Core/GitWorktree.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace LibGit2Sharp.Core
{
Expand Down Expand Up @@ -37,6 +35,8 @@ internal class git_worktree_add_options
public int locked;

public IntPtr @ref = IntPtr.Zero;

public GitCheckoutOpts checkout_options;
}

[StructLayout(LayoutKind.Sequential)]
Expand Down
10 changes: 10 additions & 0 deletions LibGit2Sharp/Core/RemoteFollowRedirects.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace LibGit2Sharp.Core
{
internal enum RemoteFollowRedirects
{
Unspecified = 0,
None = 1,
Initial = 2,
All = 4
}
}
2 changes: 1 addition & 1 deletion LibGit2Sharp/LibGit2Sharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[2.0.315-alpha.0.9]" PrivateAssets="none" />
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[2.0.315]" PrivateAssets="none" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.220" PrivateAssets="all" />
</ItemGroup>
Expand Down
28 changes: 14 additions & 14 deletions LibGit2Sharp/WorktreeCollection.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using LibGit2Sharp.Core;
using LibGit2Sharp.Core.Handles;
using System;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using LibGit2Sharp.Core;
using LibGit2Sharp.Core.Handles;

namespace LibGit2Sharp
{
Expand Down Expand Up @@ -48,7 +46,7 @@ public virtual Worktree this[string name]
}

/// <summary>
///
///
/// </summary>
/// <param name="committishOrBranchSpec"></param>
/// <param name="name"></param>
Expand All @@ -57,7 +55,7 @@ public virtual Worktree this[string name]
/// <returns></returns>
public virtual Worktree Add(string committishOrBranchSpec, string name, string path, bool isLocked)
{
if(string.Equals(committishOrBranchSpec, name))
if (string.Equals(committishOrBranchSpec, name))
{
// Proxy.git_worktree_add() creates a new branch of name = name, so if we want to checkout a given branch then the 'name' cannot be the same as the target branch
return null;
Expand All @@ -66,7 +64,8 @@ public virtual Worktree Add(string committishOrBranchSpec, string name, string p
git_worktree_add_options options = new git_worktree_add_options
{
version = 1,
locked = Convert.ToInt32(isLocked)
locked = Convert.ToInt32(isLocked),
checkout_options = new GitCheckoutOpts { version = 1 }
};

using (var handle = Proxy.git_worktree_add(repo.Handle, name, path, options))
Expand All @@ -83,13 +82,13 @@ public virtual Worktree Add(string committishOrBranchSpec, string name, string p
}
}



return this[name];

return this[name];
}

/// <summary>
///
///
/// </summary>
/// <param name="name"></param>
/// <param name="path"></param>
Expand All @@ -99,7 +98,8 @@ public virtual Worktree Add(string name, string path, bool isLocked)
git_worktree_add_options options = new git_worktree_add_options
{
version = 1,
locked = Convert.ToInt32(isLocked)
locked = Convert.ToInt32(isLocked),
checkout_options = new GitCheckoutOpts { version = 1 }
};

using (var handle = Proxy.git_worktree_add(repo.Handle, name, path, options))
Expand All @@ -112,7 +112,7 @@ public virtual Worktree Add(string name, string path, bool isLocked)
}

/// <summary>
///
///
/// </summary>
/// <param name="worktree"></param>
/// <returns></returns>
Expand All @@ -122,7 +122,7 @@ public virtual bool Prune(Worktree worktree)
}

/// <summary>
///
///
/// </summary>
/// <param name="worktree"></param>
/// <param name="ifLocked"></param>
Expand Down