diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-06-08 09:32:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 09:32:46 +0200 |
commit | b23570073eaee3489e5e3d666f22ba5cbeb53243 (patch) | |
tree | b8bfa26e2215a20810f482ca281cc831ce48e806 /plumbing/format/packfile/diff_delta.go | |
parent | a8a12e0edc6af6ea44fe8cce76d7b4658d85a50c (diff) | |
parent | 88f0dc3d89a0391f9f52d913207556d15a4c2a77 (diff) | |
download | go-git-b23570073eaee3489e5e3d666f22ba5cbeb53243.tar.gz |
Merge pull request #856 from kuba--/fix-840/corrupted-objectsv4.4.1
plumbing: packfile, Don't copy empty objects. Fixes #840
Diffstat (limited to 'plumbing/format/packfile/diff_delta.go')
-rw-r--r-- | plumbing/format/packfile/diff_delta.go | 2 |
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 |