aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/patch_delta.go
diff options
context:
space:
mode:
authorJavi Fontan <jfontan@gmail.com>2018-07-26 14:19:32 +0200
committerGitHub <noreply@github.com>2018-07-26 14:19:32 +0200
commita08061aa298ec4b92bbe470a1834465f25a0ad0d (patch)
tree8804820221e05096433b2e0cef5249e4a3e94c7b /plumbing/format/packfile/patch_delta.go
parenta8ff3e599b3ee998a8b8626cd9fe9fa68490d354 (diff)
parent79f249465b24104b73c9dc220d9098cecdab4d77 (diff)
downloadgo-git-a08061aa298ec4b92bbe470a1834465f25a0ad0d.tar.gz
Merge pull request #898 from jfontan/feature/new-packfile-parser
Feature/new packfile parser
Diffstat (limited to 'plumbing/format/packfile/patch_delta.go')
-rw-r--r--plumbing/format/packfile/patch_delta.go2
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