Skip to content

Commit c095a1d

Browse files
meyeringgitster
authored andcommitted
xdiff-interface.c: remove 10 duplicated lines
Remove an accidentally duplicated sequence of 10 lines. This happens to plug a leak, too. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 26d6cc5 commit c095a1d

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

xdiff-interface.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -254,16 +254,6 @@ static long ff_regexp(const char *line, long len,
254254

255255
line_buffer = xstrndup(line, len); /* make NUL terminated */
256256

257-
/* Exclude terminating newline (and cr) from matching */
258-
if (len > 0 && line[len-1] == '\n') {
259-
if (len > 1 && line[len-2] == '\r')
260-
len -= 2;
261-
else
262-
len--;
263-
}
264-
265-
line_buffer = xstrndup(line, len); /* make NUL terminated */
266-
267257
for (i = 0; i < regs->nr; i++) {
268258
struct ff_reg *reg = regs->array + i;
269259
if (!regexec(&reg->re, line_buffer, 2, pmatch, 0)) {
@@ -338,4 +328,3 @@ int git_xmerge_config(const char *var, const char *value, void *cb)
338328
}
339329
return git_default_config(var, value, cb);
340330
}
341-

0 commit comments

Comments
 (0)