internal unsafe TreeEntry(TreeEntryHandle entry, ObjectId parentTreeId, Repository repo, string parentPath) { this.parentTreeId = parentTreeId; this.repo = repo; targetOid = Proxy.git_tree_entry_id(entry); GitObjectType treeEntryTargetType = Proxy.git_tree_entry_type(entry); TargetType = treeEntryTargetType.ToTreeEntryTargetType(); target = new Lazy <GitObject>(RetrieveTreeEntryTarget); Mode = Proxy.git_tree_entry_attributes(entry); Name = Proxy.git_tree_entry_name(entry); path = new Lazy <string>(() => Tree.CombinePath(parentPath, Name)); }
internal TreeEntry(SafeHandle obj, ObjectId parentTreeId, Repository repo, FilePath parentPath) { this.parentTreeId = parentTreeId; this.repo = repo; targetOid = Proxy.git_tree_entry_id(obj); GitObjectType treeEntryTargetType = Proxy.git_tree_entry_type(obj); TargetType = treeEntryTargetType.ToTreeEntryTargetType(); target = new Lazy <GitObject>(RetrieveTreeEntryTarget); Mode = Proxy.git_tree_entry_attributes(obj); Name = Proxy.git_tree_entry_name(obj); path = new Lazy <string>(() => System.IO.Path.Combine(parentPath.Native, Name)); }