diff options
author | Filip Navara <navara@emclient.com> | 2019-04-24 09:22:30 +0200 |
---|---|---|
committer | Filip Navara <navara@emclient.com> | 2019-04-24 09:22:30 +0200 |
commit | 20ccd734ba1a38498d268226a3aa2e5f5f80d757 (patch) | |
tree | 9619432b1a93148521b43be15cd4dc7eb6c5cb68 | |
parent | 3237897858a3a35247e7016c90cb8e906b4cd3d2 (diff) | |
download | go-git-20ccd734ba1a38498d268226a3aa2e5f5f80d757.tar.gz |
Remove duplicate cache lookup in getObjectContent, it is already done in FSObject
Signed-off-by: Filip Navara <navara@emclient.com>
-rw-r--r-- | plumbing/format/packfile/packfile.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/plumbing/format/packfile/packfile.go b/plumbing/format/packfile/packfile.go index 0dd9730..d4e6010 100644 --- a/plumbing/format/packfile/packfile.go +++ b/plumbing/format/packfile/packfile.go @@ -266,19 +266,6 @@ func (p *Packfile) getNextObject(h *ObjectHeader, hash plumbing.Hash) (plumbing. } func (p *Packfile) getObjectContent(offset int64) (io.ReadCloser, error) { - ref, err := p.FindHash(offset) - if err == nil { - obj, ok := p.cacheGet(ref) - if ok { - reader, err := obj.Reader() - if err != nil { - return nil, err - } - - return reader, nil - } - } - h, err := p.objectHeaderAtOffset(offset) if err != nil { return nil, err |