git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: Derrick Stolee <dstolee@microsoft.com>
Subject: [PATCH] blame: drop unused parameter from maybe_changed_path
Date: Thu, 23 Apr 2020 17:03:03 -0400	[thread overview]
Message-ID: <20200423210303.GA1635761@coredump.intra.peff.net> (raw)

We don't use the "parent" parameter at all (probably because the bloom
filter for a commit is always defined against a single parent anyway).

Signed-off-by: Jeff King <peff@peff.net>
---
This is on top of ds/blame-on-bloom, which just made it to next.

I _think_ this is the right solution, but perhaps the function should be
verifying that we're looking at the right parent?

 blame.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/blame.c b/blame.c
index 9fbf79e47c..da7e28800e 100644
--- a/blame.c
+++ b/blame.c
@@ -1263,7 +1263,6 @@ struct blame_bloom_data {
 static int bloom_count_queries = 0;
 static int bloom_count_no = 0;
 static int maybe_changed_path(struct repository *r,
-			      struct commit *parent,
 			      struct blame_origin *origin,
 			      struct blame_bloom_data *bd)
 {
@@ -1355,8 +1354,7 @@ static struct blame_origin *find_origin(struct repository *r,
 		if (origin->commit->parents &&
 		    !oidcmp(&parent->object.oid,
 			    &origin->commit->parents->item->object.oid))
-			compute_diff = maybe_changed_path(r, parent,
-							  origin, bd);
+			compute_diff = maybe_changed_path(r, origin, bd);
 
 		if (compute_diff)
 			diff_tree_oid(get_commit_tree_oid(parent),
-- 
2.26.2.827.g3c1233342b

             reply	other threads:[~2020-04-23 21:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 21:03 Jeff King [this message]
2020-04-23 21:36 ` [PATCH] blame: drop unused parameter from maybe_changed_path Junio C Hamano
2020-04-24  4:32   ` Jeff King
2020-04-24 20:18     ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=20200423210303.GA1635761@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=dstolee@microsoft.com \
    --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.
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 NNTP newsgroup(s).