aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/object.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 /storage/filesystem/object.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 'storage/filesystem/object.go')
-rw-r--r--storage/filesystem/object.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/storage/filesystem/object.go b/storage/filesystem/object.go
index 4862362..0c25dad 100644
--- a/storage/filesystem/object.go
+++ b/storage/filesystem/object.go
@@ -389,6 +389,7 @@ func (s *ObjectStorage) getFromUnpacked(h plumbing.Hash) (obj plumbing.EncodedOb
return cacheObj, nil
}
+ obj = s.NewEncodedObject()
r, err := objfile.NewReader(f)
if err != nil {
return nil, err
@@ -401,14 +402,6 @@ func (s *ObjectStorage) getFromUnpacked(h plumbing.Hash) (obj plumbing.EncodedOb
return nil, err
}
- if size > packfile.LargeObjectThreshold {
- obj = dotgit.NewEncodedObject(s.dir, h, t, size)
- s.objectCache.Put(obj)
- return obj, nil
- }
-
- obj = s.NewEncodedObject()
-
obj.SetType(t)
obj.SetSize(size)
w, err := obj.Writer()