xdiff: drop XDL_EMIT_COMMON
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Feb 23, 2016 at 01:07 UTC
907681e940d095a0ab96756a8cddfd4f63cd71e1
2 files changed
-19
xdiff/xdiff.h
-1
@@ -42,7 +42,6 @@ extern "C" {
42
#define XDF_IGNORE_BLANK_LINES (1 << 7)
43
44
#define XDL_EMIT_FUNCNAMES (1 << 0)
45
-#define XDL_EMIT_COMMON (1 << 1)
45
#define XDL_EMIT_FUNCCONTEXT (1 << 2)
46
47
#define XDL_MMB_READONLY (1 << 0)
xdiff/xemit.c
-18
@@ -120,21 +120,6 @@ static long def_ff(const char *rec, long len, char *buf, long sz, void *priv)
120
return -1;
121
}
122
123
-static int xdl_emit_common(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
124
- xdemitconf_t const *xecfg) {
125
- xdfile_t *xdf = &xe->xdf2;
126
- const char *rchg = xdf->rchg;
127
- long ix;
128
-
129
- for (ix = 0; ix < xdf->nrec; ix++) {
130
- if (rchg[ix])
131
- continue;
132
- if (xdl_emit_record(xdf, ix, "", ecb))
133
- return -1;
134
- }
135
- return 0;
136
-}
137
-
123
struct func_line {
124
long len;
125
char buf[80];
@@ -170,9 +155,6 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
155
long funclineprev = -1;
156
struct func_line func_line = { 0 };
157
173
- if (xecfg->flags & XDL_EMIT_COMMON)
174
- return xdl_emit_common(xe, xscr, ecb, xecfg);
175
-
158
for (xch = xscr; xch; xch = xche->next) {
159
xche = xdl_get_hunk(&xch, xecfg);
160
if (!xch)