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>
Jim Meyering committed
Nov 26, 2008 at 14:27 UTC
c095a1db3095f26092ee2d2a9c606b8b656936af
1 file changed
-11
xdiff-interface.c
-11
@@ -254,16 +254,6 @@ static long ff_regexp(const char *line, long len,
254
255
line_buffer = xstrndup(line, len); /* make NUL terminated */
256
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
-
257
for (i = 0; i < regs->nr; i++) {
258
struct ff_reg *reg = regs->array + i;
259
if (!regexec(®->re, line_buffer, 2, pmatch, 0)) {
@@ -338,4 +328,3 @@ int git_xmerge_config(const char *var, const char *value, void *cb)
328
}
329
return git_default_config(var, value, cb);
330
}
341
-