aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/patch_delta.go
diff options
context:
space:
mode:
authorOleg Kovalov <iamolegkovalov@gmail.com>2020-07-01 20:51:24 +0200
committerOleg Kovalov <iamolegkovalov@gmail.com>2020-07-01 20:51:24 +0200
commit27a034c7643768a4ad486a64e8a1b59fa3f8b3b4 (patch)
tree9d6e25bf60cbd0e1aabbba687f2655867f113c1e /plumbing/format/packfile/patch_delta.go
parent9ac753f4afb36feb1a1c22214c16e853db54aa00 (diff)
downloadgo-git-27a034c7643768a4ad486a64e8a1b59fa3f8b3b4.tar.gz
fix goreportcard warnings
Diffstat (limited to 'plumbing/format/packfile/patch_delta.go')
-rw-r--r--plumbing/format/packfile/patch_delta.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/plumbing/format/packfile/patch_delta.go b/plumbing/format/packfile/patch_delta.go
index 1dc8b8b..9e90f30 100644
--- a/plumbing/format/packfile/patch_delta.go
+++ b/plumbing/format/packfile/patch_delta.go
@@ -49,7 +49,6 @@ func ApplyDelta(target, base plumbing.EncodedObject, delta []byte) (err error) {
return err
}
-
target.SetSize(int64(dst.Len()))
b := byteSlicePool.Get().([]byte)
@@ -113,7 +112,7 @@ func patchDelta(dst *bytes.Buffer, src, delta []byte) error {
invalidOffsetSize(offset, sz, srcSz) {
break
}
- dst.Write(src[offset:offset+sz])
+ dst.Write(src[offset : offset+sz])
remainingTargetSz -= sz
} else if isCopyFromDelta(cmd) {
sz := uint(cmd) // cmd is the size itself