diff options
author | Miguel Molina <miguel@erizocosmi.co> | 2018-07-27 15:07:25 +0200 |
---|---|---|
committer | Miguel Molina <miguel@erizocosmi.co> | 2018-07-27 15:07:25 +0200 |
commit | ccd0fa0bc17f0680038529b00f5c5a44f8e77b41 (patch) | |
tree | cfdc44429694b5f727404a0e60dd75f552621524 /plumbing/format/packfile/decoder.go | |
parent | ffdfb7dbabb78090b27ca29b762b803969c89fd7 (diff) | |
download | go-git-ccd0fa0bc17f0680038529b00f5c5a44f8e77b41.tar.gz |
plumbing: packfile, lazy object reads with DiskObjects
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Diffstat (limited to 'plumbing/format/packfile/decoder.go')
-rw-r--r-- | plumbing/format/packfile/decoder.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/format/packfile/decoder.go b/plumbing/format/packfile/decoder.go index b1a0a26..edf386b 100644 --- a/plumbing/format/packfile/decoder.go +++ b/plumbing/format/packfile/decoder.go @@ -478,7 +478,7 @@ func (d *Decoder) recallByOffset(o int64) (plumbing.EncodedObject, error) { func (d *Decoder) recallByHash(h plumbing.Hash) (plumbing.EncodedObject, error) { if d.s.IsSeekable { - if offset, err := d.idx.FindOffset(h); err != nil { + if offset, err := d.idx.FindOffset(h); err == nil { return d.DecodeObjectAt(offset) } } |