diff options
author | Filip Navara <filip.navara@gmail.com> | 2018-11-28 01:29:41 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2018-11-28 01:29:41 +0100 |
commit | 8f52c5099e7fe4a2519920a7bbf5a9bb52ff9cec (patch) | |
tree | 6b08348c45ad42e1979d35b43908d5077d99cf78 /plumbing/format/packfile/fsobject.go | |
parent | 3dbfb89e0f5bce0008724e547b999fe3af9f60db (diff) | |
download | go-git-8f52c5099e7fe4a2519920a7bbf5a9bb52ff9cec.tar.gz |
plumbing: format/packfile, performance optimizations for reading large commit histories (#963)
Signed-off-by: Filip Navara <navara@emclient.com>
Diffstat (limited to 'plumbing/format/packfile/fsobject.go')
-rw-r--r-- | plumbing/format/packfile/fsobject.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/format/packfile/fsobject.go b/plumbing/format/packfile/fsobject.go index 330cb73..a268bce 100644 --- a/plumbing/format/packfile/fsobject.go +++ b/plumbing/format/packfile/fsobject.go @@ -48,7 +48,7 @@ func NewFSObject( // Reader implements the plumbing.EncodedObject interface. func (o *FSObject) Reader() (io.ReadCloser, error) { obj, ok := o.cache.Get(o.hash) - if ok { + if ok && obj != o { reader, err := obj.Reader() if err != nil { return nil, err |