aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-09-15 21:20:58 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-09-15 21:20:58 +0200
commit7e8d7125446bb6e12a056a5a6ca979727790d0df (patch)
treedf07bada01b332d00131c33034d88935357ba0d1 /remote.go
parentd57f90b78eeb6b09b15e3fe57609ede66df4edac (diff)
downloadgo-git-7e8d7125446bb6e12a056a5a6ca979727790d0df.tar.gz
dotgit: synced write packfile and index generation
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/remote.go b/remote.go
index 8e2d8a8..3e341fa 100644
--- a/remote.go
+++ b/remote.go
@@ -174,8 +174,12 @@ func (r *Remote) updateObjectStorage(reader io.Reader) error {
}
stream := packfile.NewScanner(reader)
- d := packfile.NewDecoder(stream, s)
- _, err := d.Decode()
+ d, err := packfile.NewDecoder(stream, s)
+ if err != nil {
+ return err
+ }
+
+ _, err = d.Decode()
return err
}