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

Function allocTree

object.go:110–121  ·  view source on GitHub ↗
(ptr *C.git_tree, repo *Repository)

Source from the content-addressed store, hash-verified

108}
109
110func allocTree(ptr *C.git_tree, repo *Repository) *Tree {
111 tree := &Tree{
112 Object: Object{
113 ptr: (*C.git_object)(ptr),
114 repo: repo,
115 },
116 cast_ptr: ptr,
117 }
118 runtime.SetFinalizer(tree, (*Tree).Free)
119
120 return tree
121}
122
123func (o *Object) AsTree() (*Tree, error) {
124 cobj, err := dupObject(o, ObjectTree)

Callers 2

AsTreeMethod · 0.85
TreeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…