DecodeTree decodes an encoded object into a *Tree and associates it to the given object storer.
(s storer.EncodedObjectStorer, o plumbing.EncodedObject)
| 55 | // DecodeTree decodes an encoded object into a *Tree and associates it to the |
| 56 | // given object storer. |
| 57 | func 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 |
| 67 | type TreeEntry struct { |
no test coverage detected