Skip to content

Update libgit2 to 47f3740 #1015

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 1 commit 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
Binary file added Lib/NativeBinaries/amd64/git2-47f3740.dll
Binary file not shown.
Binary file not shown.
Binary file removed Lib/NativeBinaries/amd64/git2-9bbc8f3.dll
Binary file not shown.
Binary file added Lib/NativeBinaries/x86/git2-47f3740.dll
Binary file not shown.
Binary file not shown.
Binary file removed Lib/NativeBinaries/x86/git2-9bbc8f3.dll
Binary file not shown.
54 changes: 54 additions & 0 deletions LibGit2Sharp/Core/GitMergeOpts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ internal struct GitMergeOpts
/// Flags for automerging content.
/// </summary>
public MergeFileFavor MergeFileFavorFlags;

/// <summary>
/// Flags to use for file merging.
/// </summary>
public GitMergeFileFlags FileFlags;
}

/// <summary>
Expand Down Expand Up @@ -105,4 +110,53 @@ internal enum GitMergeTreeFlags
/// </summary>
GIT_MERGE_TREE_FIND_RENAMES = (1 << 0),
}

[Flags]
internal enum GitMergeFileFlags
{
/// <summary>
/// No options.
/// </summary>
GIT_MERGE_FILE_DEFAULT = 0,

/// <summary>
/// Creates standard conflicted merge files.
/// </summary>
GIT_MERGE_FILE_STYLE_MERGE = (1 << 0),

/// <summary>
/// Creates diff3 style files.
/// </summary>
GIT_MERGE_FILE_STYLE_DIFF3 = (1 << 1),

/// <summary>
/// Condenses non-alphanumeric regions for simplified diff files.
/// </summary>
GIT_MERGE_FILE_SIMPLIFY_ALNUM = (1 << 2),

/// <summary>
/// Ignores all whitespace.
/// </summary>
GIT_MERGE_FILE_IGNORE_WHITESPACE = (1 << 3),

/// <summary>
/// Ignores changes in amount of whitespace.
/// </summary>
GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE = (1 << 4),

/// <summary>
/// Ignores whitespace at the end of the line.
/// </summary>
GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL = (1 << 5),

/// <summary>
/// Uses the 'patience' diff algorithm.
/// </summary>
GIT_MERGE_FILE_DIFF_PATIENCE = (1 << 6),

/// <summary>
/// Take extra time to find the minimal diff.
/// </summary>
GIT_MERGE_FILE_DIFF_MINIMAL = (1 << 7),
}
}
4 changes: 3 additions & 1 deletion LibGit2Sharp/Core/GitSmartSubtransportRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ internal class GitSmartSubtransportRegistration
{
public IntPtr SubtransportCallback;
public uint Rpc;
public IntPtr Param;

public delegate int create_callback(
out IntPtr subtransport,
IntPtr transport);
IntPtr transport,
IntPtr param);
}
}
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/NativeDllName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ namespace LibGit2Sharp.Core
{
internal static class NativeDllName
{
public const string Name = "git2-9bbc8f3";
public const string Name = "git2-47f3740";
}
}
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ internal static extern int git_note_remove(

[DllImport(libgit2)]
internal static extern int git_note_default_ref(
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(LaxUtf8NoCleanupMarshaler))] out string notes_ref,
GitBuf buf,
RepositorySafeHandle repo);

internal delegate int git_note_foreach_cb(
Expand Down
6 changes: 3 additions & 3 deletions LibGit2Sharp/Core/Proxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1298,12 +1298,12 @@ public static ObjectId git_note_create(
public static string git_note_default_ref(RepositorySafeHandle repo)
{
using (ThreadAffinity())
using (var buf = new GitBuf())
{
string notes_ref;
int res = NativeMethods.git_note_default_ref(out notes_ref, repo);
int res = NativeMethods.git_note_default_ref(buf, repo);
Ensure.ZeroResult(res);

return notes_ref;
return LaxUtf8Marshaler.FromNative(buf.ptr);
}
}

Expand Down
3 changes: 2 additions & 1 deletion LibGit2Sharp/SmartSubtransportRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ private static class EntryPoints

private static int Subtransport(
out IntPtr subtransport,
IntPtr transport)
IntPtr transport,
IntPtr payload)
{
subtransport = IntPtr.Zero;

Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/libgit2_hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9bbc8f350b80a5a6e94651ec667cf9e5d545b317
47f37400253210f483d84fb9c2ecf44fb5986849
2 changes: 1 addition & 1 deletion libgit2
Submodule libgit2 updated 107 files
16 changes: 8 additions & 8 deletions nuget.package/build/LibGit2Sharp.props
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition=" '$(OS)' == 'Windows_NT' ">
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\amd64\git2-9bbc8f3.dll">
<Link>NativeBinaries\amd64\git2-9bbc8f3.dll</Link>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\amd64\git2-47f3740.dll">
<Link>NativeBinaries\amd64\git2-47f3740.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\amd64\git2-9bbc8f3.pdb">
<Link>NativeBinaries\amd64\git2-9bbc8f3.pdb</Link>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\amd64\git2-47f3740.pdb">
<Link>NativeBinaries\amd64\git2-47f3740.pdb</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\x86\git2-9bbc8f3.dll">
<Link>NativeBinaries\x86\git2-9bbc8f3.dll</Link>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\x86\git2-47f3740.dll">
<Link>NativeBinaries\x86\git2-47f3740.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\x86\git2-9bbc8f3.pdb">
<Link>NativeBinaries\x86\git2-9bbc8f3.pdb</Link>
<None Include="$(MSBuildThisFileDirectory)\..\..\lib\net40\NativeBinaries\x86\git2-47f3740.pdb">
<Link>NativeBinaries\x86\git2-47f3740.pdb</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down