diff options
author | zeripath <art27@cantab.net> | 2021-06-02 10:03:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-02 11:03:28 +0200 |
commit | da810275bf682d29a530ed819aff175f47bd7634 (patch) | |
tree | 615e4c2b301532a211e739143b28df313b110dfb /plumbing/format/packfile/fsobject.go | |
parent | db4233e9e8b3b2e37259ed4e7952faaed16218b9 (diff) | |
download | go-git-da810275bf682d29a530ed819aff175f47bd7634.tar.gz |
Revert "plumbing: format/packfile, prevent large objects from being read into memory completely (#303)" (#329)v5.4.2
This reverts commit 720c192831a890d0a36b4c6720b60411fa4a0159.
Diffstat (limited to 'plumbing/format/packfile/fsobject.go')
-rw-r--r-- | plumbing/format/packfile/fsobject.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/plumbing/format/packfile/fsobject.go b/plumbing/format/packfile/fsobject.go index 4aa3c8e..c5edaf5 100644 --- a/plumbing/format/packfile/fsobject.go +++ b/plumbing/format/packfile/fsobject.go @@ -7,7 +7,6 @@ import ( "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/cache" "github.com/go-git/go-git/v5/plumbing/format/idxfile" - "github.com/go-git/go-git/v5/utils/ioutil" ) // FSObject is an object from the packfile on the filesystem. @@ -64,20 +63,6 @@ func (o *FSObject) Reader() (io.ReadCloser, error) { } p := NewPackfileWithCache(o.index, nil, f, o.cache) - if o.size > LargeObjectThreshold { - // We have a big object - h, err := p.objectHeaderAtOffset(o.offset) - if err != nil { - return nil, err - } - - r, err := p.getReaderDirect(h) - if err != nil { - _ = f.Close() - return nil, err - } - return ioutil.NewReadCloserWithCloser(r, f.Close), nil - } r, err := p.getObjectContent(o.offset) if err != nil { _ = f.Close() |