From 664296985c2f05df83da9b859c258d97e6a11ba3 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 20 Mar 2019 04:15:07 -0400 Subject: unpack-trees: drop name_entry from traverse_by_cache_tree() We pull the names from the existing index rather than the tree entry, which is after all the point of this function. Let's drop the unused "names" parameter. Note that we leave the "nr_names" parameter, as it tells us how many trees we are traversing (and thus how many index stages to set up). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano diff --git a/unpack-trees.c b/unpack-trees.c index 22c41a3..79551ab 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -707,7 +707,6 @@ static int index_pos_by_traverse_info(struct name_entry *names, * instead of ODB since we already know what these trees contain. */ static int traverse_by_cache_tree(int pos, int nr_entries, int nr_names, - struct name_entry *names, struct traverse_info *info) { struct cache_entry *src[MAX_UNPACK_TREES + 1] = { NULL, }; @@ -797,7 +796,7 @@ static int traverse_trees_recursive(int n, unsigned long dirmask, * unprocessed entries before 'pos'. */ bottom = o->cache_bottom; - ret = traverse_by_cache_tree(pos, nr_entries, n, names, info); + ret = traverse_by_cache_tree(pos, nr_entries, n, info); o->cache_bottom = bottom; return ret; } -- cgit v0.10.2-6-g49f6