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>2013-09-23 22:44:28 +0400
committernulltoken <emeric.fermas@gmail.com>2013-09-26 01:19:00 +0400
commit7b7042341db182ec949cff3ed84766ea2f55baf1 (patch)
tree0ffd89a66d9261f1e25e02c6c65a20fdefe04594 /LibGit2Sharp
parentd54f395e076d3f81a720b356d9869d9d93298345 (diff)
Update libgit2 binaries to 11f8336
https://github.com/libgit2/libgit2/compare/32e4992...11f8336
Diffstat (limited to 'LibGit2Sharp')
-rw-r--r--LibGit2Sharp/Core/GitCloneOptions.cs1
-rw-r--r--LibGit2Sharp/Core/GitErrorCategory.cs4
-rw-r--r--LibGit2Sharp/Core/GitOdbBackendStream.cs3
-rw-r--r--LibGit2Sharp/Core/NativeDllName.cs2
-rw-r--r--LibGit2Sharp/Core/NativeMethods.cs2
-rw-r--r--LibGit2Sharp/Core/Proxy.cs4
-rw-r--r--LibGit2Sharp/Index.cs2
-rw-r--r--LibGit2Sharp/LibGit2Sharp.csproj1
-rw-r--r--LibGit2Sharp/OrphanedHeadException.cs3
-rw-r--r--LibGit2Sharp/Repository.cs8
-rw-r--r--LibGit2Sharp/RepositoryInformation.cs15
-rw-r--r--LibGit2Sharp/UnbornBranchException.cs49
-rw-r--r--LibGit2Sharp/libgit2_hash.txt2
13 files changed, 83 insertions, 13 deletions
diff --git a/LibGit2Sharp/Core/GitCloneOptions.cs b/LibGit2Sharp/Core/GitCloneOptions.cs
index 4b6c6832..5382b60a 100644
--- a/LibGit2Sharp/Core/GitCloneOptions.cs
+++ b/LibGit2Sharp/Core/GitCloneOptions.cs
@@ -9,6 +9,7 @@ namespace LibGit2Sharp.Core
public uint Version = 1;
public GitCheckoutOpts CheckoutOpts;
+ public IntPtr InitOptions;
public int Bare;
public NativeMethods.git_transfer_progress_callback TransferProgressCallback;
public IntPtr TransferProgressPayload;
diff --git a/LibGit2Sharp/Core/GitErrorCategory.cs b/LibGit2Sharp/Core/GitErrorCategory.cs
index d8d06676..6782871c 100644
--- a/LibGit2Sharp/Core/GitErrorCategory.cs
+++ b/LibGit2Sharp/Core/GitErrorCategory.cs
@@ -23,5 +23,9 @@ namespace LibGit2Sharp.Core
Thread,
Stash,
Checkout,
+ FetchHead,
+ Merge,
+ Ssh,
+ Filter,
}
}
diff --git a/LibGit2Sharp/Core/GitOdbBackendStream.cs b/LibGit2Sharp/Core/GitOdbBackendStream.cs
index 5c5dbd18..82f6ce89 100644
--- a/LibGit2Sharp/Core/GitOdbBackendStream.cs
+++ b/LibGit2Sharp/Core/GitOdbBackendStream.cs
@@ -22,6 +22,9 @@ namespace LibGit2Sharp.Core
public GitOdbBackendStreamMode Mode;
public IntPtr HashCtx;
+ public UIntPtr DeclaredSize;
+ public UIntPtr ReceivedBytes;
+
public read_callback Read;
public write_callback Write;
public finalize_write_callback FinalizeWrite;
diff --git a/LibGit2Sharp/Core/NativeDllName.cs b/LibGit2Sharp/Core/NativeDllName.cs
index 7f4d6c95..03663892 100644
--- a/LibGit2Sharp/Core/NativeDllName.cs
+++ b/LibGit2Sharp/Core/NativeDllName.cs
@@ -2,6 +2,6 @@ namespace LibGit2Sharp.Core
{
internal static class NativeDllName
{
- public const string Name = "git2-32e4992";
+ public const string Name = "git2-11f8336";
}
}
diff --git a/LibGit2Sharp/Core/NativeMethods.cs b/LibGit2Sharp/Core/NativeMethods.cs
index 407531b9..9fc8ba87 100644
--- a/LibGit2Sharp/Core/NativeMethods.cs
+++ b/LibGit2Sharp/Core/NativeMethods.cs
@@ -879,7 +879,7 @@ namespace LibGit2Sharp.Core
internal static extern int git_repository_head_detached(RepositorySafeHandle repo);
[DllImport(libgit2)]
- internal static extern int git_repository_head_orphan(RepositorySafeHandle repo);
+ internal static extern int git_repository_head_unborn(RepositorySafeHandle repo);
[DllImport(libgit2)]
internal static extern int git_repository_index(out IndexSafeHandle index, RepositorySafeHandle repo);
diff --git a/LibGit2Sharp/Core/Proxy.cs b/LibGit2Sharp/Core/Proxy.cs
index 97834513..cf9dfe2b 100644
--- a/LibGit2Sharp/Core/Proxy.cs
+++ b/LibGit2Sharp/Core/Proxy.cs
@@ -1556,9 +1556,9 @@ namespace LibGit2Sharp.Core
NativeMethods.git_repository_free(repo);
}
- public static bool git_repository_head_orphan(RepositorySafeHandle repo)
+ public static bool git_repository_head_unborn(RepositorySafeHandle repo)
{
- return RepositoryStateChecker(repo, NativeMethods.git_repository_head_orphan);
+ return RepositoryStateChecker(repo, NativeMethods.git_repository_head_unborn);
}
public static IndexSafeHandle git_repository_index(RepositorySafeHandle repo)
diff --git a/LibGit2Sharp/Index.cs b/LibGit2Sharp/Index.cs
index f5b12870..d077f0e7 100644
--- a/LibGit2Sharp/Index.cs
+++ b/LibGit2Sharp/Index.cs
@@ -212,7 +212,7 @@ namespace LibGit2Sharp
{
Ensure.ArgumentNotNull(paths, "paths");
- if (repo.Info.IsHeadOrphaned)
+ if (repo.Info.IsHeadUnborn)
{
var compareOptions = new CompareOptions { SkipPatchBuilding = true };
TreeChanges changes = repo.Diff.Compare(null, DiffTargets.Index, paths, explicitPathsOptions, compareOptions);
diff --git a/LibGit2Sharp/LibGit2Sharp.csproj b/LibGit2Sharp/LibGit2Sharp.csproj
index 18810b4c..1ff1ce6f 100644
--- a/LibGit2Sharp/LibGit2Sharp.csproj
+++ b/LibGit2Sharp/LibGit2Sharp.csproj
@@ -72,6 +72,7 @@
<Compile Include="CommitFilter.cs" />
<Compile Include="CommitSortStrategies.cs" />
<Compile Include="CompareOptions.cs" />
+ <Compile Include="UnbornBranchException.cs" />
<Compile Include="LockedFileException.cs" />
<Compile Include="Core\GitRepositoryInitOptions.cs" />
<Compile Include="Core\HistoryRewriter.cs" />
diff --git a/LibGit2Sharp/OrphanedHeadException.cs b/LibGit2Sharp/OrphanedHeadException.cs
index aa5398bb..a314d6df 100644
--- a/LibGit2Sharp/OrphanedHeadException.cs
+++ b/LibGit2Sharp/OrphanedHeadException.cs
@@ -8,7 +8,8 @@ namespace LibGit2Sharp
/// branch is performed against an unborn branch.
/// </summary>
[Serializable]
- public class OrphanedHeadException : LibGit2SharpException
+ [Obsolete("This type will be removed in the next release. Please use UnbornBranchException instead.")]
+ public class OrphanedHeadException : UnbornBranchException
{
/// <summary>
/// Initializes a new instance of the <see cref="OrphanedHeadException"/> class.
diff --git a/LibGit2Sharp/Repository.cs b/LibGit2Sharp/Repository.cs
index 3ec3def4..d9399302 100644
--- a/LibGit2Sharp/Repository.cs
+++ b/LibGit2Sharp/Repository.cs
@@ -665,7 +665,7 @@ namespace LibGit2Sharp
// Make sure this is not an unborn branch.
if (branch.Tip == null)
{
- throw new OrphanedHeadException(
+ throw new UnbornBranchException(
string.Format(CultureInfo.InvariantCulture,
"The tip of branch '{0}' is null. There's nothing to checkout.", branch.Name));
}
@@ -865,11 +865,11 @@ namespace LibGit2Sharp
/// <returns>The generated <see cref="Commit"/>.</returns>
public Commit Commit(string message, Signature author, Signature committer, bool amendPreviousCommit = false)
{
- bool isHeadOrphaned = Info.IsHeadOrphaned;
+ bool isHeadOrphaned = Info.IsHeadUnborn;
if (amendPreviousCommit && isHeadOrphaned)
{
- throw new OrphanedHeadException("Can not amend anything. The Head doesn't point at any commit.");
+ throw new UnbornBranchException("Can not amend anything. The Head doesn't point at any commit.");
}
var treeId = Proxy.git_tree_create_fromindex(Index);
@@ -925,7 +925,7 @@ namespace LibGit2Sharp
return Head.Tip.Parents;
}
- if (Info.IsHeadOrphaned)
+ if (Info.IsHeadUnborn)
{
return Enumerable.Empty<Commit>();
}
diff --git a/LibGit2Sharp/RepositoryInformation.cs b/LibGit2Sharp/RepositoryInformation.cs
index 5eddc34a..3fd78922 100644
--- a/LibGit2Sharp/RepositoryInformation.cs
+++ b/LibGit2Sharp/RepositoryInformation.cs
@@ -1,4 +1,5 @@
-using LibGit2Sharp.Core;
+using System;
+using LibGit2Sharp.Core;
namespace LibGit2Sharp
{
@@ -62,9 +63,19 @@ namespace LibGit2Sharp
/// <summary>
/// Indicates whether the Head points to a reference which doesn't exist.
/// </summary>
+ [Obsolete("This property will be removed in the next release. Please use IsHeadUnborn instead.")]
public virtual bool IsHeadOrphaned
{
- get { return Proxy.git_repository_head_orphan(repo.Handle); }
+ get { return IsHeadUnborn; }
+ }
+
+
+ /// <summary>
+ /// Indicates whether the Head points to a reference which doesn't exist.
+ /// </summary>
+ public virtual bool IsHeadUnborn
+ {
+ get { return Proxy.git_repository_head_unborn(repo.Handle); }
}
/// <summary>
diff --git a/LibGit2Sharp/UnbornBranchException.cs b/LibGit2Sharp/UnbornBranchException.cs
new file mode 100644
index 00000000..0ee5e4af
--- /dev/null
+++ b/LibGit2Sharp/UnbornBranchException.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Runtime.Serialization;
+
+namespace LibGit2Sharp
+{
+ /// <summary>
+ /// The exception that is thrown when a operation requiring an existing
+ /// branch is performed against an unborn branch.
+ /// </summary>
+ [Serializable]
+ public class UnbornBranchException : LibGit2SharpException
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="OrphanedHeadException"/> class.
+ /// </summary>
+ public UnbornBranchException()
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="UnbornBranchException"/> class with a specified error message.
+ /// </summary>
+ /// <param name="message">A message that describes the error.</param>
+ public UnbornBranchException(string message)
+ : base(message)
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="UnbornBranchException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
+ /// </summary>
+ /// <param name="message">The error message that explains the reason for the exception.</param>
+ /// <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException"/> parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.</param>
+ public UnbornBranchException(string message, Exception innerException)
+ : base(message, innerException)
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="UnbornBranchException"/> class with a serialized data.
+ /// </summary>
+ /// <param name="info">The <see cref="SerializationInfo "/> that holds the serialized object data about the exception being thrown.</param>
+ /// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
+ protected UnbornBranchException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
+ }
+}
diff --git a/LibGit2Sharp/libgit2_hash.txt b/LibGit2Sharp/libgit2_hash.txt
index 5a9529f0..f3f5d3a0 100644
--- a/LibGit2Sharp/libgit2_hash.txt
+++ b/LibGit2Sharp/libgit2_hash.txt
@@ -1 +1 @@
-32e49929725a76d9871038f30e2ea67fe0e4a4f8
+11f8336ec93ea3a270c9fe80c4bbb68aa4729423