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 <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2005-12-12 12:01:52 -08:00
parent e726715a52
commit 962537a3eb
2 changed files with 3 additions and 3 deletions

View File

@ -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;