git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: [PATCH 06/13] unpack-trees: drop name_entry from traverse_by_cache_tree()
Date: Wed, 20 Mar 2019 04:15:07 -0400	[thread overview]
Message-ID: <20190320081507.GF10403@sigill.intra.peff.net> (raw)
In-Reply-To: <20190320081258.GA5621@sigill.intra.peff.net>

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 --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;
 	}
-- 
2.21.0.701.g4401309e11


  parent reply	other threads:[~2019-03-20  8:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20  8:12 [PATCH 0/13] more unused parameter cleanups Jeff King
2019-03-20  8:13 ` [PATCH 01/13] revision: drop some unused "revs" parameters Jeff King
2019-03-20  8:13 ` [PATCH 02/13] log: drop unused rev_info from early output Jeff King
2019-03-20  8:14 ` [PATCH 03/13] log: drop unused "len" from show_tagger() Jeff King
2019-03-20  8:14 ` [PATCH 04/13] update-index: drop unused prefix_length parameter from do_reupdate() Jeff King
2019-03-20  8:14 ` [PATCH 05/13] test-date: drop unused "now" parameter from parse_dates() Jeff King
2019-03-20  8:15 ` Jeff King [this message]
2019-03-20  8:15 ` [PATCH 07/13] unpack-trees: drop unused error_type parameters Jeff King
2019-03-20  8:15 ` [PATCH 08/13] report_path_error(): drop unused prefix parameter Jeff King
2019-03-20  8:16 ` [PATCH 09/13] fetch_pack(): drop unused parameters Jeff King
2019-03-20  8:16 ` [PATCH 10/13] parse-options: drop unused ctx parameter from show_gitcomp() Jeff King
2019-03-20  8:16 ` [PATCH 11/13] pretty: drop unused "type" parameter in needs_rfc2047_encoding() Jeff King
2019-03-20  8:16 ` [PATCH 12/13] pretty: drop unused strbuf from parse_padding_placeholder() Jeff King
2019-03-20  8:16 ` [PATCH 13/13] parse_opt_ref_sorting: always use with NONEG flag Jeff King
2019-03-20 12:22   ` Martin Ågren
2019-03-20 20:22     ` Jeff King
2019-03-20  9:29 ` [PATCH 0/13] more unused parameter cleanups Junio C Hamano
2019-03-21  8:50 ` Ævar Arnfjörð Bjarmason
2019-03-21  9:44   ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190320081507.GF10403@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).