diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2022-11-07 16:53:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-07 16:53:56 +0100 |
commit | 652bc83fe45c114440de41d7e0fecf3e4b9e517d (patch) | |
tree | a784f0a4b677abc00247638e600f5efef1c44dfc /plumbing/format/packfile/patch_delta.go | |
parent | 08cffa1efade914020497a73907763e8d3707a77 (diff) | |
parent | ffa7e69efb8c4ba8d4e08ec4c65e49e2228fd88b (diff) | |
download | go-git-652bc83fe45c114440de41d7e0fecf3e4b9e517d.tar.gz |
Merge pull request #602 from pjbgf/parse-optimisation
Parse optimisations
Diffstat (limited to 'plumbing/format/packfile/patch_delta.go')
-rw-r--r-- | plumbing/format/packfile/patch_delta.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plumbing/format/packfile/patch_delta.go b/plumbing/format/packfile/patch_delta.go index 17da11e..053466d 100644 --- a/plumbing/format/packfile/patch_delta.go +++ b/plumbing/format/packfile/patch_delta.go @@ -53,9 +53,10 @@ func ApplyDelta(target, base plumbing.EncodedObject, delta []byte) (err error) { target.SetSize(int64(dst.Len())) - b := byteSlicePool.Get().([]byte) + bufp := byteSlicePool.Get().(*[]byte) + b := *bufp _, err = io.CopyBuffer(w, dst, b) - byteSlicePool.Put(b) + byteSlicePool.Put(bufp) return err } |