Skip to content

Commit

Permalink
pack-objects: fix early eviction for max depth delta objects
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed May 4, 2008
1 parent ed4a903 commit 70baf5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-pack-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 70baf5d

Please sign in to comment.