summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-19 02:05:57 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-19 02:21:52 (GMT)
commit15ba3af2d5056313fa19ceb0cb7f7cb3cdd54f16 (patch)
treed00bc5700c9feaedaa59a95b70d05f9999cceb00 /merge-recursive.c
parenta5e92abde61d59a8612c5b87d0bae681e90f7fdb (diff)
downloadgit-15ba3af2d5056313fa19ceb0cb7f7cb3cdd54f16.zip
git-15ba3af2d5056313fa19ceb0cb7f7cb3cdd54f16.tar.gz
git-15ba3af2d5056313fa19ceb0cb7f7cb3cdd54f16.tar.bz2
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>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index ec8438b..65c018b 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -809,6 +809,9 @@ static int ll_ext_merge(const struct ll_merge_driver *fn,
int status, fd, i;
struct stat st;
+ if (fn->cmdline == NULL)
+ die("custom merge driver %s lacks command line.", fn->name);
+
result->ptr = NULL;
result->size = 0;
create_temp(orig, temp[0]);
@@ -879,7 +882,7 @@ static int read_merge_config(const char *var, const char *value)
* especially, we do not want to look at variables such as
* "merge.summary", "merge.tool", and "merge.verbosity".
*/
- if (prefixcmp(var, "merge.") || (ep = strrchr(var, '.')) == var + 6)
+ if (prefixcmp(var, "merge.") || (ep = strrchr(var, '.')) == var + 5)
return 0;
/*