MCPcopy Create free account
hub / github.com/libgit2/git2go / EntryByIndex

Method EntryByIndex

tree.go:107–116  ·  view source on GitHub ↗
(index uint64)

Source from the content-addressed store, hash-verified

105}
106
107func (t *Tree) EntryByIndex(index uint64) *TreeEntry {
108 entry := C.git_tree_entry_byindex(t.cast_ptr, C.size_t(index))
109 if entry == nil {
110 return nil
111 }
112
113 goEntry := newTreeEntry(entry)
114 runtime.KeepAlive(t)
115 return goEntry
116}
117
118func (t *Tree) EntryCount() uint64 {
119 num := C.git_tree_entrycount(t.cast_ptr)

Callers 1

TestCherrypickCommitFunction · 0.45

Calls 1

newTreeEntryFunction · 0.85

Tested by 1

TestCherrypickCommitFunction · 0.36