diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-04-16 13:46:40 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-04-24 12:51:45 +0400 |
commit | 43ea52a5a82f4d6c595e2d89f5bdff663bb65a7a (patch) | |
tree | 606eabbbc265115cf9c0de7c18aef39f19f51843 | |
parent | 00d6d1be22a8fe92d8bb3765220db6c66b03a40a (diff) |
Internally expose the oid of a TreeEntry target
-rw-r--r-- | LibGit2Sharp/Index.cs | 2 | ||||
-rw-r--r-- | LibGit2Sharp/TreeEntry.cs | 5 |
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> |