git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Stefan Frühwirth" <stefan.fruehwirth@uni-graz.at>, git@vger.kernel.org
Subject: [PATCH 3/3] xdiff: drop XDL_EMIT_COMMON
Date: Tue, 23 Feb 2016 01:07:25 -0500	[thread overview]
Message-ID: <20160223060725.GC3205@sigill.intra.peff.net> (raw)
In-Reply-To: <20160223060338.GA2912@sigill.intra.peff.net>

There are no more callers that use this mode, and none
likely to be added (as our xdl_merge() eliminates the common
use of it for generating 3-way merge bases).

This is effectively a revert of a9ed376 (xdiff: generate
"anti-diffs" aka what is common to two files, 2006-06-28),
though of course trying to revert that ancient commit
directly produces many textual conflicts.

Signed-off-by: Jeff King <peff@peff.net>
---
 xdiff/xdiff.h |  1 -
 xdiff/xemit.c | 18 ------------------
 2 files changed, 19 deletions(-)

diff --git a/xdiff/xdiff.h b/xdiff/xdiff.h
index c033991..4fb7e79 100644
--- a/xdiff/xdiff.h
+++ b/xdiff/xdiff.h
@@ -42,7 +42,6 @@ extern "C" {
 #define XDF_IGNORE_BLANK_LINES (1 << 7)
 
 #define XDL_EMIT_FUNCNAMES (1 << 0)
-#define XDL_EMIT_COMMON (1 << 1)
 #define XDL_EMIT_FUNCCONTEXT (1 << 2)
 
 #define XDL_MMB_READONLY (1 << 0)
diff --git a/xdiff/xemit.c b/xdiff/xemit.c
index 4266ada..993724b 100644
--- a/xdiff/xemit.c
+++ b/xdiff/xemit.c
@@ -120,21 +120,6 @@ static long def_ff(const char *rec, long len, char *buf, long sz, void *priv)
 	return -1;
 }
 
-static int xdl_emit_common(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
-                           xdemitconf_t const *xecfg) {
-	xdfile_t *xdf = &xe->xdf2;
-	const char *rchg = xdf->rchg;
-	long ix;
-
-	for (ix = 0; ix < xdf->nrec; ix++) {
-		if (rchg[ix])
-			continue;
-		if (xdl_emit_record(xdf, ix, "", ecb))
-			return -1;
-	}
-	return 0;
-}
-
 struct func_line {
 	long len;
 	char buf[80];
@@ -170,9 +155,6 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
 	long funclineprev = -1;
 	struct func_line func_line = { 0 };
 
-	if (xecfg->flags & XDL_EMIT_COMMON)
-		return xdl_emit_common(xe, xscr, ecb, xecfg);
-
 	for (xch = xscr; xch; xch = xche->next) {
 		xche = xdl_get_hunk(&xch, xecfg);
 		if (!xch)
-- 
2.7.2.645.g4e1306c

  parent reply	other threads:[~2016-02-23  6:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 22:34 What's cooking in git.git (Feb 2016, #05; Wed, 17) Junio C Hamano
2016-02-17 23:25 ` Jeff King
2016-02-18 17:51   ` Junio C Hamano
2016-02-22 22:12 ` whither merge-tree? (was: What's cooking in git.git (Feb 2016, #05; Wed, 17)) Jeff King
2016-02-22 22:45   ` whither merge-tree? Junio C Hamano
2016-02-23  5:02     ` Jeff King
2016-02-23  5:14       ` Jeff King
2016-02-23  6:03         ` Jeff King
2016-02-23  6:04           ` [PATCH 1/3] merge-one-file: use empty blob for add/add base Jeff King
2016-02-23  6:06           ` [PATCH 2/3] merge-tree: drop generate_common strategy Jeff King
2016-02-23  6:07           ` Jeff King [this message]
2016-02-23  6:35           ` whither merge-tree? Junio C Hamano
2016-02-23  7:18             ` Jeff King
2016-02-23  9:49       ` Stefan Frühwirth
2016-02-24  7:28         ` Dennis Kaarsemaker
2016-02-24  7:57           ` Jeff King
2016-02-24  7:58         ` Jeff King
2016-02-23 12:36       ` Johannes Schindelin
2016-02-23 12:41         ` Duy Nguyen

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=20160223060725.GC3205@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=stefan.fruehwirth@uni-graz.at \
    /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).