diff options
author | Alberto Cortés <alcortesm@gmail.com> | 2016-08-09 20:45:01 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-09 20:45:01 +0200 |
commit | 92648fe0135b48370dfa98d4f31a99a14165b3b2 (patch) | |
tree | 106c6d4dbc694eb218638d60af296edef6efcba0 /tree.go | |
parent | 61c530655c44f3581738a497ce4d4175658d59c6 (diff) | |
download | go-git-92648fe0135b48370dfa98d4f31a99a14165b3b2.tar.gz |
Decode tree bug: incomplete reads break the decoding process (#64)
* Add test that fails for incomplete reads from an object
* Fix imcomplete reads
Diffstat (limited to 'tree.go')
-rw-r--r-- | tree.go | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -178,8 +178,7 @@ func (t *Tree) Decode(o core.Object) (err error) { } var hash core.Hash - _, err = r.Read(hash[:]) - if err != nil && err != io.EOF { + if _, err = io.ReadFull(r, hash[:]); err != nil { return err } |