MCPcopy Create free account
hub / github.com/go-git/go-git / DecodeTree

Function DecodeTree

plumbing/object/tree.go:57–64  ·  view source on GitHub ↗

DecodeTree decodes an encoded object into a *Tree and associates it to the given object storer.

(s storer.EncodedObjectStorer, o plumbing.EncodedObject)

Source from the content-addressed store, hash-verified

55// DecodeTree decodes an encoded object into a *Tree and associates it to the
56// given object storer.
57func DecodeTree(s storer.EncodedObjectStorer, o plumbing.EncodedObject) (*Tree, error) {
58 t := &Tree{s: s}
59 if err := t.Decode(o); err != nil {
60 return nil, err
61 }
62
63 return t, nil
64}
65
66// TreeEntry represents a file
67type TreeEntry struct {

Callers 4

GetTreeFunction · 0.85
NextMethod · 0.85
ForEachMethod · 0.85
DecodeObjectFunction · 0.85

Calls 1

DecodeMethod · 0.95

Tested by

no test coverage detected