From 962537a3eb03a118cf27d9d0da365a3216ed1caa Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 12 Dec 2005 12:01:52 -0800 Subject: diff-delta.c: allow delta with empty blob. Delta computation with an empty blob used to punt and returned NULL. This commit allows creation with empty blob; all combination of empty->empty, empty->something, and something->empty are allowed. Signed-off-by: Junio C Hamano --- diff-delta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'diff-delta.c') diff --git a/diff-delta.c b/diff-delta.c index b2ae7b5e6c..cf5013896f 100644 --- a/diff-delta.c +++ b/diff-delta.c @@ -213,7 +213,7 @@ void *diff_delta(void *from_buf, unsigned long from_size, bdrecord_t *brec; bdfile_t bdf; - if (!from_size || !to_size || delta_prepare(from_buf, from_size, &bdf)) + if (delta_prepare(from_buf, from_size, &bdf)) return NULL; outpos = 0; -- cgit v1.2.1