From 88f0dc3d89a0391f9f52d913207556d15a4c2a77 Mon Sep 17 00:00:00 2001 From: kuba-- Date: Thu, 7 Jun 2018 22:23:58 +0200 Subject: plumbing: packfile, Don't push empty objects. Fixes #840 Signed-off-by: kuba-- --- plumbing/format/packfile/diff_delta.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plumbing/format/packfile/diff_delta.go') 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 -- cgit