aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/scanner.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-06-02 10:03:28 +0100
committerGitHub <noreply@github.com>2021-06-02 11:03:28 +0200
commitda810275bf682d29a530ed819aff175f47bd7634 (patch)
tree615e4c2b301532a211e739143b28df313b110dfb /plumbing/format/packfile/scanner.go
parentdb4233e9e8b3b2e37259ed4e7952faaed16218b9 (diff)
downloadgo-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/scanner.go')
-rw-r--r--plumbing/format/packfile/scanner.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/plumbing/format/packfile/scanner.go b/plumbing/format/packfile/scanner.go
index 5d9e8fb..6e6a687 100644
--- a/plumbing/format/packfile/scanner.go
+++ b/plumbing/format/packfile/scanner.go
@@ -320,21 +320,6 @@ func (s *Scanner) NextObject(w io.Writer) (written int64, crc32 uint32, err erro
return
}
-// ReadObject returns a reader for the object content and an error
-func (s *Scanner) ReadObject() (io.ReadCloser, error) {
- s.pendingObject = nil
- zr := zlibReaderPool.Get().(io.ReadCloser)
-
- if err := zr.(zlib.Resetter).Reset(s.r, nil); err != nil {
- return nil, fmt.Errorf("zlib reset error: %s", err)
- }
-
- return ioutil.NewReadCloserWithCloser(zr, func() error {
- zlibReaderPool.Put(zr)
- return nil
- }), nil
-}
-
// ReadRegularObject reads and write a non-deltified object
// from it zlib stream in an object entry in the packfile.
func (s *Scanner) copyObject(w io.Writer) (n int64, err error) {