aboutsummaryrefslogtreecommitdiffstats
path: root/tree.go
diff options
context:
space:
mode:
Diffstat (limited to 'tree.go')
-rw-r--r--tree.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/tree.go b/tree.go
index f56d49e..7135813 100644
--- a/tree.go
+++ b/tree.go
@@ -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
}