summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a7269e5)
raw | patch | inline | side by side (parent: a7269e5)
author | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Feb 2008 18:53:56 +0000 (10:53 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Feb 2008 21:11:36 +0000 (13:11 -0800) |
diff.external, diff.*.command, diff.color.*, color.diff.* and
diff.*.funcname configuration variables expect a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.*.funcname configuration variables expect a string value.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | patch | blob | history |
index 5b8afdcb05abd4f634b49adb2f521fc75e220647..4d2e23ae1b7dd4bd43d5c03871ce8ab519272115 100644 (file)
--- a/diff.c
+++ b/diff.c
return 0;
}
if (!strcmp(var, "diff.external")) {
+ if (!value)
+ return config_error_nonbool(var);
external_diff_cmd_cfg = xstrdup(value);
return 0;
}
const char *ep = strrchr(var, '.');
if (ep != var + 4) {
- if (!strcmp(ep, ".command"))
+ if (!strcmp(ep, ".command")) {
+ if (!value)
+ return config_error_nonbool(var);
return parse_lldiff_command(var, ep, value);
+ }
}
}
{
if (!prefixcmp(var, "diff.color.") || !prefixcmp(var, "color.diff.")) {
int slot = parse_diff_color_slot(var, 11);
+ if (!value)
+ return config_error_nonbool(var);
color_parse(value, var, diff_colors[slot]);
return 0;
}
if (!prefixcmp(var, "diff.")) {
const char *ep = strrchr(var, '.');
if (ep != var + 4) {
- if (!strcmp(ep, ".funcname"))
+ if (!strcmp(ep, ".funcname")) {
+ if (!value)
+ return config_error_nonbool(var);
return parse_funcname_pattern(var, ep, value);
+ }
}
}