summaryrefslogtreecommitdiff
path: root/diff-delta.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-12 20:01:52 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-12-12 20:57:25 (GMT)
commit962537a3eb03a118cf27d9d0da365a3216ed1caa (patch)
treeabc9d37b3200dde75043e757387f665ebce5a023 /diff-delta.c
parente726715a52e25d8035c89d4ea09398599610737e (diff)
downloadgit-962537a3eb03a118cf27d9d0da365a3216ed1caa.zip
git-962537a3eb03a118cf27d9d0da365a3216ed1caa.tar.gz
git-962537a3eb03a118cf27d9d0da365a3216ed1caa.tar.bz2
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>
Diffstat (limited to 'diff-delta.c')
-rw-r--r--diff-delta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff-delta.c b/diff-delta.c
index b2ae7b5..cf50138 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;