@matheusbsbs / matheus-bagliano / commits / daec808cc6
Fork 0

diff.c: Use 'git_config_string' to get 'diff.external'

Signed-off-by: Brian Hetro <whee@smaertness.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brian Hetro committed Jul 5, 2008 at 01:24 UTC daec808cc61af32de789a31dd5c96001915c3f2d
1 file changed +2 -6
diff.c
+2 -6
@@ -153,12 +153,8 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
153 diff_auto_refresh_index = git_config_bool(var, value);
154 return 0;
155 }
156 - if (!strcmp(var, "diff.external")) {
157 - if (!value)
158 - return config_error_nonbool(var);
159 - external_diff_cmd_cfg = xstrdup(value);
160 - return 0;
161 - }
156 + if (!strcmp(var, "diff.external"))
157 + return git_config_string(&external_diff_cmd_cfg, var, value);
158 if (!prefixcmp(var, "diff.")) {
159 const char *ep = strrchr(var, '.');
160