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>2012-04-16 13:46:40 +0400
committernulltoken <emeric.fermas@gmail.com>2012-04-24 12:51:45 +0400
commit43ea52a5a82f4d6c595e2d89f5bdff663bb65a7a (patch)
tree606eabbbc265115cf9c0de7c18aef39f19f51843 /LibGit2Sharp
parent00d6d1be22a8fe92d8bb3765220db6c66b03a40a (diff)
Internally expose the oid of a TreeEntry target
Diffstat (limited to 'LibGit2Sharp')
-rw-r--r--LibGit2Sharp/Index.cs2
-rw-r--r--LibGit2Sharp/TreeEntry.cs5
2 files changed, 6 insertions, 1 deletions
diff --git a/LibGit2Sharp/Index.cs b/LibGit2Sharp/Index.cs
index e380031b..38c3e943 100644
--- a/LibGit2Sharp/Index.cs
+++ b/LibGit2Sharp/Index.cs
@@ -418,7 +418,7 @@ namespace LibGit2Sharp
var indexEntry = new GitIndexEntry
{
Mode = (uint)treeEntry.Attributes,
- oid = treeEntry.Target.Id.Oid,
+ oid = treeEntry.TargetId.Oid,
Path = utf8Marshaler.MarshalManagedToNative(relativePath),
};
diff --git a/LibGit2Sharp/TreeEntry.cs b/LibGit2Sharp/TreeEntry.cs
index 441674de..4957cf63 100644
--- a/LibGit2Sharp/TreeEntry.cs
+++ b/LibGit2Sharp/TreeEntry.cs
@@ -57,6 +57,11 @@ namespace LibGit2Sharp
get { return target.Value; }
}
+ internal ObjectId TargetId
+ {
+ get { return targetOid; }
+ }
+
/// <summary>
/// Gets the <see cref = "GitObjectType" /> of the <see cref = "Target" /> being pointed at.
/// </summary>