aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/diff_delta.go
diff options
context:
space:
mode:
authorkuba-- <kuba@sourced.tech>2018-06-07 22:23:58 +0200
committerkuba-- <kuba@sourced.tech>2018-06-07 22:23:58 +0200
commit88f0dc3d89a0391f9f52d913207556d15a4c2a77 (patch)
treeb8bfa26e2215a20810f482ca281cc831ce48e806 /plumbing/format/packfile/diff_delta.go
parenta8a12e0edc6af6ea44fe8cce76d7b4658d85a50c (diff)
downloadgo-git-88f0dc3d89a0391f9f52d913207556d15a4c2a77.tar.gz
plumbing: packfile, Don't push empty objects. Fixes #840
Signed-off-by: kuba-- <kuba@sourced.tech>
Diffstat (limited to 'plumbing/format/packfile/diff_delta.go')
-rw-r--r--plumbing/format/packfile/diff_delta.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/format/packfile/diff_delta.go b/plumbing/format/packfile/diff_delta.go
index 4d56dc1..d35e78a 100644
--- a/plumbing/format/packfile/diff_delta.go
+++ b/plumbing/format/packfile/diff_delta.go
@@ -111,7 +111,7 @@ func diffDelta(index *deltaIndex, src []byte, tgt []byte) []byte {
rl := l
aOffset := offset
- for {
+ for rl > 0 {
if rl < maxCopySize {
buf.Write(encodeCopyOperation(aOffset, rl))
break