diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-08-14 09:57:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 09:57:46 +0200 |
commit | a28c2ce44695f13ddf28748958f236afd8e0b544 (patch) | |
tree | 107dd441cd96b44b4f3994d26faf5f0bfae933fc /plumbing/format/packfile/patch_delta.go | |
parent | c3740924da0d1929cb523c85ae9da3b456b901ea (diff) | |
parent | 8d75d239e93474e4287870e4e5143da14e2c360d (diff) | |
download | go-git-a28c2ce44695f13ddf28748958f236afd8e0b544.tar.gz |
Merge pull request #906 from src-d/perf/packfile-reads
Improve packfile reading performance
Diffstat (limited to 'plumbing/format/packfile/patch_delta.go')
-rw-r--r-- | plumbing/format/packfile/patch_delta.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/format/packfile/patch_delta.go b/plumbing/format/packfile/patch_delta.go index c604851..a972f1c 100644 --- a/plumbing/format/packfile/patch_delta.go +++ b/plumbing/format/packfile/patch_delta.go @@ -63,8 +63,8 @@ func PatchDelta(src, delta []byte) ([]byte, error) { targetSz, delta := decodeLEB128(delta) remainingTargetSz := targetSz - var dest []byte var cmd byte + dest := make([]byte, 0, targetSz) for { if len(delta) == 0 { return nil, ErrInvalidDelta |