Skip to content

Commit 6642969

Browse files
peffgitster
authored andcommitted
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>
1 parent 04c4c76 commit 6642969

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

unpack-trees.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,6 @@ static int index_pos_by_traverse_info(struct name_entry *names,
707707
* instead of ODB since we already know what these trees contain.
708708
*/
709709
static int traverse_by_cache_tree(int pos, int nr_entries, int nr_names,
710-
struct name_entry *names,
711710
struct traverse_info *info)
712711
{
713712
struct cache_entry *src[MAX_UNPACK_TREES + 1] = { NULL, };
@@ -797,7 +796,7 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
797796
* unprocessed entries before 'pos'.
798797
*/
799798
bottom = o->cache_bottom;
800-
ret = traverse_by_cache_tree(pos, nr_entries, n, names, info);
799+
ret = traverse_by_cache_tree(pos, nr_entries, n, info);
801800
o->cache_bottom = bottom;
802801
return ret;
803802
}

0 commit comments

Comments
 (0)