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

Method AsTree

object.go:123–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121}
122
123func (o *Object) AsTree() (*Tree, error) {
124 cobj, err := dupObject(o, ObjectTree)
125 if err != nil {
126 return nil, err
127 }
128
129 return allocTree((*C.git_tree)(cobj), o.repo), nil
130}
131
132func allocCommit(ptr *C.git_commit, repo *Repository) *Commit {
133 commit := &Commit{

Callers 4

TestObjectPoymorphismFunction · 0.95
LookupTreeMethod · 0.80
LookupPrefixTreeMethod · 0.80
TestIndexReadTreeFunction · 0.80

Calls 2

dupObjectFunction · 0.85
allocTreeFunction · 0.85

Tested by 2

TestObjectPoymorphismFunction · 0.76
TestIndexReadTreeFunction · 0.64