pack-objects: fix early eviction for max depth delta objects

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>
maint
Nicolas Pitre 2008-05-02 15:11:51 -04:00 committed by Junio C Hamano
parent ed4a9031ea
commit 70baf5d41a
1 changed files with 1 additions and 1 deletions

View 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;

/*