Skip to content

Commit

Permalink
xdiff-interface.c: remove 10 duplicated lines
Browse files Browse the repository at this point in the history
Remove an accidentally duplicated sequence of 10 lines.
This happens to plug a leak, too.

Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
meyering authored and gitster committed Nov 26, 2008
1 parent 26d6cc5 commit c095a1d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions xdiff-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(&reg->re, line_buffer, 2, pmatch, 0)) {
Expand Down Expand Up @@ -338,4 +328,3 @@ int git_xmerge_config(const char *var, const char *value, void *cb)
}
return git_default_config(var, value, cb);
}

0 comments on commit c095a1d

Please sign in to comment.