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

Method LookupTree

repository.go:241–249  ·  view source on GitHub ↗
(id *Oid)

Source from the content-addressed store, hash-verified

239}
240
241func (v *Repository) LookupTree(id *Oid) (*Tree, error) {
242 obj, err := v.lookupType(id, ObjectTree)
243 if err != nil {
244 return nil, err
245 }
246 defer obj.Free()
247
248 return obj.AsTree()
249}
250
251// LookupPrefixTree looks up a tree by its OID given a prefix of its identifier.
252func (v *Repository) LookupPrefixTree(id *Oid, prefix uint) (*Tree, error) {

Callers 15

TestPatchFunction · 0.80
TestCreateCommitBufferFunction · 0.80
TestCreateCommitFromIdsFunction · 0.80
TestRepositorySetConfigFunction · 0.80
commitSomethingFunction · 0.80
prepareStashRepoFunction · 0.80
seedTestRepoOptFunction · 0.80
updateReadmeFunction · 0.80
createTestTreesFunction · 0.80
TestApplyDiffAddfileFunction · 0.80
TestApplyToTreeFunction · 0.80
addAndGetTreeFunction · 0.80

Calls 3

lookupTypeMethod · 0.95
AsTreeMethod · 0.80
FreeMethod · 0.65

Tested by 15

TestPatchFunction · 0.64
TestCreateCommitBufferFunction · 0.64
TestCreateCommitFromIdsFunction · 0.64
TestRepositorySetConfigFunction · 0.64
commitSomethingFunction · 0.64
prepareStashRepoFunction · 0.64
seedTestRepoOptFunction · 0.64
updateReadmeFunction · 0.64
createTestTreesFunction · 0.64
TestApplyDiffAddfileFunction · 0.64
TestApplyToTreeFunction · 0.64
addAndGetTreeFunction · 0.64