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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2019-03-20 04:15:07 -04:00 коммит произвёл Junio C Hamano
Родитель 04c4c766ec
Коммит 664296985c
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -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;
}