Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [PATCH] binary patch.

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:42:25

Possibly related (same subject, not in this thread)

On Fri, 5 May 2006, Junio C Hamano wrote:
quoted
Yeah, things still to be done are deflating both delta and
optionally perhaps use just deflate without delta for "new file"
codepath.
+	/* We could do deflated delta, or we could do just deflated two,
+	 * whichever is smaller.
+	 */
+	delta = NULL;
+	deflated = deflate_it(two->ptr, two->size, &deflate_size);
+	if (one->size && two->size) {
+		delta = diff_delta(one->ptr, one->size,
+				   two->ptr, two->size,
+				   &delta_size, deflate_size);
Here you probably want to use deflate_size-1 (deflate_size can't be 0).
+		orig_size = delta_size;
+		if (delta)
+			delta = deflate_it(delta, delta_size, &delta_size);
Here you're leaking the original delta buffer memory.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help