diff options
author | nulltoken <emeric.fermas@gmail.com> | 2011-05-21 15:39:09 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2011-05-21 15:39:09 +0400 |
commit | b283190928f8faf98ea1476acaf052ae9ea0ffc5 (patch) | |
tree | 59e63f8f99f787e60e7246de0df5316dae66005e /LibGit2Sharp/ObjectId.cs | |
parent | 49410b0afecfdd963175c75104787b26f3cda59a (diff) |
Minor ObjectId refactoring
Diffstat (limited to 'LibGit2Sharp/ObjectId.cs')
-rw-r--r-- | LibGit2Sharp/ObjectId.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/LibGit2Sharp/ObjectId.cs b/LibGit2Sharp/ObjectId.cs index d576a769..a1368098 100644 --- a/LibGit2Sharp/ObjectId.cs +++ b/LibGit2Sharp/ObjectId.cs @@ -31,13 +31,10 @@ namespace LibGit2Sharp /// Initializes a new instance of the <see cref="ObjectId"/> class. /// </summary> /// <param name="rawId">The byte array.</param> - public ObjectId(byte[] rawId) + public ObjectId(byte[] rawId) : this(new GitOid{Id = rawId} ) { Ensure.ArgumentNotNull(rawId, "rawId"); Ensure.ArgumentConformsTo(rawId, b => b.Length == rawSize, "rawId"); - - oid = new GitOid { Id = rawId }; - Sha = Stringify(oid); } /// <summary> @@ -110,7 +107,7 @@ namespace LibGit2Sharp { var hex = new byte[hexSize]; NativeMethods.git_oid_fmt(hex, ref oid); - return Encoding.UTF8.GetString(hex); + return Encoding.ASCII.GetString(hex); } /// <summary> |