projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
44db136
)
Revert "diff-delta.c: allow delta with empty blob."
author
Junio C Hamano
<junkio@cox.net>
Tue, 13 Dec 2005 00:42:38 +0000
(16:42 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 13 Dec 2005 00:42:38 +0000
(16:42 -0800)
This reverts
962537a3eb03a118cf27d9d0da365a3216ed1caa
commit to
play safe.
delta.h
patch
|
blob
|
history
diff-delta.c
patch
|
blob
|
history
diff --git
a/delta.h
b/delta.h
index
c6a4763
..
31d1820
100644
(file)
--- a/
delta.h
+++ b/
delta.h
@@
-9,8
+9,8
@@
extern void *patch_delta(void *src_buf, unsigned long src_size,
void *delta_buf, unsigned long delta_size,
unsigned long *dst_size);
void *delta_buf, unsigned long delta_size,
unsigned long *dst_size);
-/* the smallest possible delta size is
2 bytes (empty to empty)
*/
-#define DELTA_SIZE_MIN
2
+/* the smallest possible delta size is
4 bytes
*/
+#define DELTA_SIZE_MIN
4
/*
* This must be called twice on the delta data buffer, first to get the
/*
* This must be called twice on the delta data buffer, first to get the
diff --git
a/diff-delta.c
b/diff-delta.c
index
cf50138
..
b2ae7b5
100644
(file)
--- 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;
bdrecord_t *brec;
bdfile_t bdf;
- if (delta_prepare(from_buf, from_size, &bdf))
+ if (
!from_size || !to_size ||
delta_prepare(from_buf, from_size, &bdf))
return NULL;
outpos = 0;
return NULL;
outpos = 0;