@matheusbsbs / matheus-bagliano / commits / 15ba3af2d5
Fork 0

Counto-fix in merge-recursive

When the configuration has variables unrelated to low-level merge drivers (e.g. merge.summary), the code failed to ignore them but did something totally senseless. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Apr 18, 2007 at 19:05 UTC 15ba3af2d5056313fa19ceb0cb7f7cb3cdd54f16
1 file changed +4 -1
merge-recursive.c
+4 -1
@@ -809,6 +809,9 @@ static int ll_ext_merge(const struct ll_merge_driver *fn,
809 int status, fd, i;
810 struct stat st;
811
812 + if (fn->cmdline == NULL)
813 + die("custom merge driver %s lacks command line.", fn->name);
814 +
815 result->ptr = NULL;
816 result->size = 0;
817 create_temp(orig, temp[0]);
@@ -879,7 +882,7 @@ static int read_merge_config(const char *var, const char *value)
882 * especially, we do not want to look at variables such as
883 * "merge.summary", "merge.tool", and "merge.verbosity".
884 */
882 - if (prefixcmp(var, "merge.") || (ep = strrchr(var, '.')) == var + 6)
885 + if (prefixcmp(var, "merge.") || (ep = strrchr(var, '.')) == var + 5)
886 return 0;
887
888 /*