summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c2a3367)
raw | patch | inline | side by side (parent: c2a3367)
author | Nicolas Pitre <nico@cam.org> | |
Mon, 10 Sep 2007 04:06:10 +0000 (00:06 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 10 Sep 2007 05:25:43 +0000 (22:25 -0700) |
Try to keep object with the same name hash together.
Suggested by Martin Koegler.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Suggested by Martin Koegler.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c | patch | blob | history |
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 60141196df4f7adad565ce9b839d58e984f102e1..b13558ee7ea2623d426bc4af7787e3e488990dda 100644 (file)
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
if (sublist_size > list_size)
sublist_size = list_size;
+ /* try to split chunks on "path" boundaries */
+ while (sublist_size < list_size && list[sublist_size]->hash &&
+ list[sublist_size]->hash == list[sublist_size-1]->hash)
+ sublist_size++;
+
pthread_mutex_lock(&data_provider);
data_requester->list = list;
data_requester->list_size = sublist_size;