Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2015-06-17 11:31:47 +0300
committernulltoken <emeric.fermas@gmail.com>2015-06-17 11:31:47 +0300
commit87067b503ef7c36e1f4045c8fcca1d34593ed11b (patch)
tree503dd3d1c25b87840d93a3ac5cb6f0026b3f17d0
parentb9ba915b2cba9fe9a189e61c5042f890fceb1589 (diff)
parent62669eccf59bac3076e216692c3ac9d833450ee2 (diff)
Merge pull request #1100 from libgit2/ntk/libgit2_upgrade
Update libgit2 to a56db99
-rw-r--r--LibGit2Sharp/Core/GitCredentialType.cs15
-rw-r--r--LibGit2Sharp/Core/GitDiff.cs29
-rw-r--r--LibGit2Sharp/Core/NativeMethods.cs7
-rw-r--r--LibGit2Sharp/Core/Proxy.cs4
-rw-r--r--LibGit2Sharp/LibGit2Sharp.csproj4
-rw-r--r--LibGit2Sharp/packages.config2
6 files changed, 56 insertions, 5 deletions
diff --git a/LibGit2Sharp/Core/GitCredentialType.cs b/LibGit2Sharp/Core/GitCredentialType.cs
index 00a7460d..0ab1273e 100644
--- a/LibGit2Sharp/Core/GitCredentialType.cs
+++ b/LibGit2Sharp/Core/GitCredentialType.cs
@@ -32,5 +32,20 @@ namespace LibGit2Sharp.Core
/// TODO
/// </summary>
SshInteractive = (1 << 4),
+
+ /// <summary>
+ /// Username-only information
+ ///
+ /// If the SSH transport does not know which username to use,
+ /// it will ask via this credential type.
+ /// </summary>
+ Username = (1 << 5),
+
+ /// <summary>
+ /// Credentials read from memory.
+ ///
+ /// Only available for libssh2+OpenSSL for now.
+ /// </summary>
+ SshMemory = (1 << 6),
}
}
diff --git a/LibGit2Sharp/Core/GitDiff.cs b/LibGit2Sharp/Core/GitDiff.cs
index ab9f691d..4d1e9768 100644
--- a/LibGit2Sharp/Core/GitDiff.cs
+++ b/LibGit2Sharp/Core/GitDiff.cs
@@ -363,4 +363,33 @@ namespace LibGit2Sharp.Core
// TODO
public IntPtr SimilarityMetric;
}
+
+ [Flags]
+ enum GitDiffBinaryType
+ {
+ // There is no binary delta.
+ GIT_DIFF_BINARY_NONE = 0,
+
+ // The binary data is the literal contents of the file. */
+ GIT_DIFF_BINARY_LITERAL,
+
+ // The binary data is the delta from one side to the other. */
+ GIT_DIFF_BINARY_DELTA,
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal class GitDiffBinaryFile
+ {
+ public GitDiffBinaryType Type;
+ public IntPtr Data;
+ public UIntPtr DataLen;
+ public UIntPtr InflatedLen;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal class GitDiffBinary
+ {
+ public GitDiffBinaryFile OldFile;
+ public GitDiffBinaryFile NewFile;
+ }
}
diff --git a/LibGit2Sharp/Core/NativeMethods.cs b/LibGit2Sharp/Core/NativeMethods.cs
index 125822a4..2590669b 100644
--- a/LibGit2Sharp/Core/NativeMethods.cs
+++ b/LibGit2Sharp/Core/NativeMethods.cs
@@ -473,6 +473,11 @@ namespace LibGit2Sharp.Core
[In] GitDiffLine line,
IntPtr payload);
+ internal delegate int git_diff_binary_cb(
+ [In] GitDiffDelta delta,
+ [In] GitDiffBinary binary,
+ IntPtr payload);
+
[DllImport(libgit2)]
internal static extern int git_diff_blobs(
GitObjectSafeHandle oldBlob,
@@ -481,6 +486,7 @@ namespace LibGit2Sharp.Core
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictFilePathMarshaler))] FilePath new_as_path,
GitDiffOptions options,
git_diff_file_cb fileCallback,
+ git_diff_binary_cb binaryCallback,
git_diff_hunk_cb hunkCallback,
git_diff_line_cb lineCallback,
IntPtr payload);
@@ -489,6 +495,7 @@ namespace LibGit2Sharp.Core
internal static extern int git_diff_foreach(
DiffSafeHandle diff,
git_diff_file_cb fileCallback,
+ git_diff_binary_cb binaryCallback,
git_diff_hunk_cb hunkCallback,
git_diff_line_cb lineCallback,
IntPtr payload);
diff --git a/LibGit2Sharp/Core/Proxy.cs b/LibGit2Sharp/Core/Proxy.cs
index 5a52f066..c18c3bfe 100644
--- a/LibGit2Sharp/Core/Proxy.cs
+++ b/LibGit2Sharp/Core/Proxy.cs
@@ -701,7 +701,7 @@ namespace LibGit2Sharp.Core
{
int res = NativeMethods.git_diff_blobs(
osw1.ObjectPtr, null, osw2.ObjectPtr, null,
- options, fileCallback, hunkCallback, lineCallback, IntPtr.Zero);
+ options, fileCallback, null, hunkCallback, lineCallback, IntPtr.Zero);
Ensure.ZeroResult(res);
}
@@ -713,7 +713,7 @@ namespace LibGit2Sharp.Core
NativeMethods.git_diff_hunk_cb hunkCallback,
NativeMethods.git_diff_line_cb lineCallback)
{
- int res = NativeMethods.git_diff_foreach(diff, fileCallback, hunkCallback, lineCallback, IntPtr.Zero);
+ int res = NativeMethods.git_diff_foreach(diff, fileCallback, null, hunkCallback, lineCallback, IntPtr.Zero);
Ensure.ZeroResult(res);
}
diff --git a/LibGit2Sharp/LibGit2Sharp.csproj b/LibGit2Sharp/LibGit2Sharp.csproj
index 72153093..1642d2ab 100644
--- a/LibGit2Sharp/LibGit2Sharp.csproj
+++ b/LibGit2Sharp/LibGit2Sharp.csproj
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.51\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.51\build\LibGit2Sharp.NativeBinaries.props')" />
+ <Import Project="..\packages\LibGit2Sharp.NativeBinaries.1.0.55\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.55\build\LibGit2Sharp.NativeBinaries.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -392,7 +392,7 @@
<PropertyGroup>
<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>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.51\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.51\build\LibGit2Sharp.NativeBinaries.props'))" />
+ <Error Condition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.55\build\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.55\build\LibGit2Sharp.NativeBinaries.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/LibGit2Sharp/packages.config b/LibGit2Sharp/packages.config
index 6565d177..659d5e5b 100644
--- a/LibGit2Sharp/packages.config
+++ b/LibGit2Sharp/packages.config
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="LibGit2Sharp.NativeBinaries" version="1.0.51" targetFramework="net40" allowedVersions="[1.0.51]" />
+ <package id="LibGit2Sharp.NativeBinaries" version="1.0.55" targetFramework="net40" allowedVersions="[1.0.55]" />
</packages> \ No newline at end of file