summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e8b32e0)
raw | patch | inline | side by side (parent: e8b32e0)
author | Christian Couder <chriscool@tuxfamily.org> | |
Sat, 16 Feb 2008 04:59:53 +0000 (05:59 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 16 Feb 2008 05:24:53 +0000 (21:24 -0800) |
It is not necessary to check if value != NULL before calling
'parse_lldiff_command' as there is already a check inside this
function.
By the way this patch also improves the existing check inside
'parse_lldiff_command' by using:
return config_error_nonbool(var);
instead of:
return error("%s: lacks value", var);
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
'parse_lldiff_command' as there is already a check inside this
function.
By the way this patch also improves the existing check inside
'parse_lldiff_command' by using:
return config_error_nonbool(var);
instead of:
return error("%s: lacks value", var);
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | patch | blob | history |
index 047310fc94e0ad87770f4b9244b8410f3d471053..ed41ce418ee88894f9a3870a1c59eef8ee7baf31 100644 (file)
--- a/diff.c
+++ b/diff.c
if (!prefixcmp(var, "diff.")) {
const char *ep = strrchr(var, '.');
- if (ep != var + 4) {
- if (!strcmp(ep, ".command")) {
- if (!value)
- return config_error_nonbool(var);
- return parse_lldiff_command(var, ep, value);
- }
- }
+ if (ep != var + 4 && !strcmp(ep, ".command"))
+ return parse_lldiff_command(var, ep, value);
}
return git_diff_basic_config(var, value);