* [PATCH] xdiff-interface.c: remove 10 duplicated lines
@ 2008-11-26 13:27 Jim Meyering
0 siblings, 0 replies; only message in thread
From: Jim Meyering @ 2008-11-26 13:27 UTC (permalink / raw)
To: git list
Remove an accidentally duplicated sequence of 10 lines.
This happens to plug a leak, too.
---
This is relative to the tip of "next".
xdiff-interface.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/xdiff-interface.c b/xdiff-interface.c
index e8ef46d..d782f06 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -247,30 +247,20 @@ static long ff_regexp(const char *line, long len,
/* 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 */
- /* 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)) {
if (reg->negate)
goto fail;
break;
}
}
if (regs->nr <= i)
goto fail;
@@ -331,11 +321,10 @@ int git_xmerge_config(const char *var, const char *value, void *cb)
git_xmerge_style = XDL_MERGE_DIFF3;
else if (!strcmp(value, "merge"))
git_xmerge_style = 0;
else
die("unknown style '%s' given for '%s'",
value, var);
return 0;
}
return git_default_config(var, value, cb);
}
-
--
1.6.0.4.1044.g77718
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-26 13:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-26 13:27 [PATCH] xdiff-interface.c: remove 10 duplicated lines Jim Meyering
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox