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:
authorKeith Dahlby <dahlbyk@gmail.com>2013-02-28 11:10:16 +0400
committernulltoken <emeric.fermas@gmail.com>2013-02-28 20:17:48 +0400
commit09beddcee56015bcdd15bda692c028698fc9cb96 (patch)
tree67c7f243cfb65c42c45f46cb4ae1264794984f7b /LibGit2Sharp/ObjectId.cs
parentfd218c07649bce79b63cae868be30f077fb1ac33 (diff)
Add implicit cast from GitOid(?) to ObjectId
Also, support marshaling NULL in OidSafeHandle
Diffstat (limited to 'LibGit2Sharp/ObjectId.cs')
-rw-r--r--LibGit2Sharp/ObjectId.cs16
1 files changed, 1 insertions, 15 deletions
diff --git a/LibGit2Sharp/ObjectId.cs b/LibGit2Sharp/ObjectId.cs
index 792ef4a5..08fa1129 100644
--- a/LibGit2Sharp/ObjectId.cs
+++ b/LibGit2Sharp/ObjectId.cs
@@ -98,7 +98,7 @@ namespace LibGit2Sharp
/// <returns>true if the <paramref name = "sha" /> parameter was converted successfully; otherwise, false.</returns>
public static bool TryParse(string sha, out ObjectId result)
{
- result = BuildFrom(sha, false);
+ result = BuildOidFrom(sha, false);
return result != null;
}
@@ -113,20 +113,6 @@ namespace LibGit2Sharp
return ToOid(sha);
}
- private static ObjectId BuildFrom(string sha, bool shouldThrowIfInvalid)
- {
- GitOid? oid = BuildOidFrom(sha, shouldThrowIfInvalid);
-
- if (!oid.HasValue)
- {
- return null;
- }
-
- var objectId = new ObjectId(oid.Value);
-
- return objectId;
- }
-
/// <summary>
/// Determines whether the specified <see cref = "Object" /> is equal to the current <see cref = "ObjectId" />.
/// </summary>