[PATCH] xdiff-interface.c: remove 10 duplicated lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(&reg->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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux