diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-02-17 11:52:11 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-02-17 11:52:11 +0100 |
commit | 104be6870196d221a06291917c8660412a96cdbc (patch) | |
tree | 4c094cd6afb95cb2832f866b9411276418435819 /commit.go | |
parent | 1ac00554c3b5f88d2ddc2e28e7cfcdcad9d9f4bb (diff) | |
parent | a964e32d92c53a47ce7c46d589a18c62133b8c50 (diff) | |
download | go-git-104be6870196d221a06291917c8660412a96cdbc.tar.gz |
Merge pull request #28 from mcuadros/memory-object
storages: memory object
Diffstat (limited to 'commit.go')
-rw-r--r-- | commit.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -51,6 +51,10 @@ func (c *Commit) File(path string) (file *File, err error) { // Decode transform an core.Object into a Blob struct func (c *Commit) Decode(o core.Object) error { + if o.Type() != core.CommitObject { + return ErrUnsupportedObject + } + c.Hash = o.Hash() r := bufio.NewReader(o.Reader()) |