Code

pack-objects: fix early eviction for max depth delta objects
authorNicolas Pitre <nico@cam.org>
Fri, 2 May 2008 19:11:51 +0000 (15:11 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 4 May 2008 01:35:38 +0000 (18:35 -0700)
The 'depth' variable doesn't reflect the actual maximum depth used
when other objects already depend on the current one.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c

index 4a0c9c907b5e67379ea826a366522a6af7df1e5f..e20851e1c9c9ad517314794b7c8d4e3615afa9c5 100644 (file)
@@ -1486,7 +1486,7 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,
                 * depth, leaving it in the window is pointless.  we
                 * should evict it first.
                 */
-               if (entry->delta && depth <= n->depth)
+               if (entry->delta && max_depth <= n->depth)
                        continue;
 
                /*