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 04/10] diff: drop complete_rewrite parameter from run_external_diff()
Date: Thu, 14 Feb 2019 00:49:42 -0500	[thread overview]
Message-ID: <20190214054941.GD20578@sigill.intra.peff.net> (raw)
In-Reply-To: <20190214054736.GA20091@sigill.intra.peff.net>

Our builtin_diff() wants to know whether break-detection found a
complete rewrite, because it changes how the diff is shown. However,
when calling out to an external diff, we don't pass this information
along (and doing so would require designing a new interface to the
user-provided program).

Let's drop the unused parameter to make this fact more clear.

Signed-off-by: Jeff King <peff@peff.net>
---
An alternative is to pass $COMPLETE_REWRITE in the environment. That
would avoid disrupting existing external diff callers, and they could
peek at the information if they really cared. But given that nobody has
actually asked for this, I'm inclined not to add a new interface element
that we'd then have to support forever.

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

diff --git a/diff.c b/diff.c
index d24843b531..e3f263769b 100644
--- a/diff.c
+++ b/diff.c
@@ -4178,7 +4178,6 @@ static void run_external_diff(const char *pgm,
 			      struct diff_filespec *one,
 			      struct diff_filespec *two,
 			      const char *xfrm_msg,
-			      int complete_rewrite,
 			      struct diff_options *o)
 {
 	struct argv_array argv = ARGV_ARRAY_INIT;
@@ -4336,8 +4335,7 @@ static void run_diff_cmd(const char *pgm,
 	}
 
 	if (pgm) {
-		run_external_diff(pgm, name, other, one, two, xfrm_msg,
-				  complete_rewrite, o);
+		run_external_diff(pgm, name, other, one, two, xfrm_msg, o);
 		return;
 	}
 	if (one && two)
-- 
2.21.0.rc1.567.g648f076c3f


  parent reply	other threads:[~2019-02-14  5:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14  5:47 [PATCH 0/10] dropping more unused function parameters Jeff King
2019-02-14  5:48 ` [PATCH 01/10] diff: drop options parameter from diffcore_fix_diff_index() Jeff King
2019-02-14  5:48 ` [PATCH 02/10] diff: drop unused color reset parameters Jeff King
2019-02-14  5:48 ` [PATCH 03/10] diff: drop unused emit data parameter from sane_truncate_line() Jeff King
2019-02-14  5:49 ` Jeff King [this message]
2019-02-14  5:50 ` [PATCH 05/10] merge-recursive: drop several unused parameters Jeff King
2019-02-14  5:50 ` [PATCH 06/10] pack-objects: drop unused parameter from oe_map_new_pack() Jeff King
2019-02-14  5:50 ` [PATCH 07/10] files-backend: drop refs parameter from split_symref_update() Jeff King
2019-02-14  5:50 ` [PATCH 08/10] ref-filter: drop unused buf/sz pairs Jeff King
2019-02-14  5:50 ` [PATCH 09/10] ref-filter: drop unused "obj" parameters Jeff King
2019-02-14  5:51 ` [PATCH 10/10] ref-filter: drop unused "sz" parameters 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=20190214054941.GD20578@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).