diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-02-17 00:24:31 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-02-17 11:46:00 +0100 |
commit | a964e32d92c53a47ce7c46d589a18c62133b8c50 (patch) | |
tree | 4c094cd6afb95cb2832f866b9411276418435819 /tree.go | |
parent | 1ac00554c3b5f88d2ddc2e28e7cfcdcad9d9f4bb (diff) | |
download | go-git-a964e32d92c53a47ce7c46d589a18c62133b8c50.tar.gz |
storages: memory object
Diffstat (limited to 'tree.go')
-rw-r--r-- | tree.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -151,6 +151,10 @@ func (t *Tree) walkEntries(base string, ch chan *File) { // Decode transform an core.Object into a Tree struct func (t *Tree) Decode(o core.Object) error { + if o.Type() != core.TreeObject { + return ErrUnsupportedObject + } + t.Hash = o.Hash() if o.Size() == 0 { return nil |