Skip to content

Commit 907681e

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b779b3a commit 907681e

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

xdiff/xdiff.h

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ extern "C" {
4242
#define XDF_IGNORE_BLANK_LINES (1 << 7)
4343

4444
#define XDL_EMIT_FUNCNAMES (1 << 0)
45-
#define XDL_EMIT_COMMON (1 << 1)
4645
#define XDL_EMIT_FUNCCONTEXT (1 << 2)
4746

4847
#define XDL_MMB_READONLY (1 << 0)

xdiff/xemit.c

-18
Original file line numberDiff line numberDiff line change
@@ -120,21 +120,6 @@ static long def_ff(const char *rec, long len, char *buf, long sz, void *priv)
120120
return -1;
121121
}
122122

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-
138123
struct func_line {
139124
long len;
140125
char buf[80];
@@ -170,9 +155,6 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
170155
long funclineprev = -1;
171156
struct func_line func_line = { 0 };
172157

173-
if (xecfg->flags & XDL_EMIT_COMMON)
174-
return xdl_emit_common(xe, xscr, ecb, xecfg);
175-
176158
for (xch = xscr; xch; xch = xche->next) {
177159
xche = xdl_get_hunk(&xch, xecfg);
178160
if (!xch)

0 commit comments

Comments
 (0)