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