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

Method Tree

commit.go:132–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130}
131
132func (c *Commit) Tree() (*Tree, error) {
133 var ptr *C.git_tree
134
135 runtime.LockOSThread()
136 defer runtime.UnlockOSThread()
137
138 err := C.git_commit_tree(&ptr, c.cast_ptr)
139 runtime.KeepAlive(c)
140 if err < 0 {
141 return nil, MakeGitError(err)
142 }
143
144 return allocTree(ptr, c.repo), nil
145}
146
147func (c *Commit) TreeId() *Oid {
148 ret := newOidFromC(C.git_commit_tree_id(c.cast_ptr))

Callers 6

checkoutFunction · 0.80
headTreeFunction · 0.80
TestApplyDiffAddfileFunction · 0.80
addAndGetTreeFunction · 0.80
TestObjectPoymorphismFunction · 0.80

Calls 2

MakeGitErrorFunction · 0.85
allocTreeFunction · 0.85

Tested by 6

checkoutFunction · 0.64
headTreeFunction · 0.64
TestApplyDiffAddfileFunction · 0.64
addAndGetTreeFunction · 0.64
TestObjectPoymorphismFunction · 0.64