From: Jim Meyering Date: Wed, 26 Nov 2008 13:27:10 +0000 (+0100) Subject: xdiff-interface.c: remove 10 duplicated lines X-Git-Tag: v1.6.1-rc1~21 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c095a1db3095f26092ee2d2a9c606b8b656936af;p=git.git 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 --- diff --git a/xdiff-interface.c b/xdiff-interface.c index e8ef46d10..d782f06d9 100644 --- a/xdiff-interface.c +++ b/xdiff-interface.c @@ -254,16 +254,6 @@ static long ff_regexp(const char *line, long len, line_buffer = xstrndup(line, len); /* make NUL terminated */ - /* Exclude terminating newline (and cr) from matching */ - if (len > 0 && line[len-1] == '\n') { - if (len > 1 && line[len-2] == '\r') - len -= 2; - else - len--; - } - - line_buffer = xstrndup(line, len); /* make NUL terminated */ - for (i = 0; i < regs->nr; i++) { struct ff_reg *reg = regs->array + i; if (!regexec(®->re, line_buffer, 2, pmatch, 0)) { @@ -338,4 +328,3 @@ int git_xmerge_config(const char *var, const char *value, void *cb) } return git_default_config(var, value, cb); } -