diff mbox series

[06/13] unpack-trees: drop name_entry from traverse_by_cache_tree()

Message ID 20190320081507.GF10403@sigill.intra.peff.net (mailing list archive)
State New, archived
Headers show
Series more unused parameter cleanups | expand

Commit Message

Jeff King March 20, 2019, 8:15 a.m. UTC
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>
---
 unpack-trees.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/unpack-trees.c b/unpack-trees.c
index 22c41a3ba8..79551ab9cc 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;
 	}