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

Re: [PATCH 2/2] Teach "delta" attribute to pack-objects.

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:43:12

On Sat, 19 May 2007, Junio C Hamano wrote:
This teaches pack-objects to use .gitattributes mechanism so
that the user can specify certain blobs are not worth spending
CPU cycles to attempt deltification.
[...]
quoted hunk ↗ jump to hunk
@@ -1349,6 +1376,10 @@ static void find_deltas(struct object_entry **list, int window, int depth)
 
 		if (entry->size < 50)
 			continue;
+
+		if (entry->no_try_delta)
+			continue;
+
 		free_delta_index(n->index);
 		n->index = NULL;
 		free(n->data);
@@ -1376,6 +1407,8 @@ static void find_deltas(struct object_entry **list, int window, int depth)
 			m = array + other_idx;
 			if (!m->entry)
 				break;
+			if (m->entry->no_try_delta)
+				continue;
 			if (try_delta(n, m, max_depth) < 0)
 				break;
 		}
This last hunk is unnecessary.  Because of the other hunk above, the 
no_try_delta objects will never get into the m array.

Well done otherwise.  This attribute thing is really nice.


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