@matheusbsbs / matheus-bagliano / commits / 70cff3ac16
Fork 0

builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix'

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 70cff3ac16e842e465f304e7af3b588840899dc9
1 file changed +4 -12
builtin-log.c
+4 -12
@@ -234,12 +234,8 @@ static int git_log_config(const char *var, const char *value, void *cb)
234 {
235 if (!strcmp(var, "format.pretty"))
236 return git_config_string(&fmt_pretty, var, value);
237 - if (!strcmp(var, "format.subjectprefix")) {
238 - if (!value)
239 - config_error_nonbool(var);
240 - fmt_patch_subject_prefix = xstrdup(value);
241 - return 0;
242 - }
237 + if (!strcmp(var, "format.subjectprefix"))
238 + return git_config_string(&fmt_patch_subject_prefix, var, value);
239 if (!strcmp(var, "log.date"))
240 return git_config_string(&default_date_mode, var, value);
241 if (!strcmp(var, "log.showroot")) {
@@ -489,12 +485,8 @@ static int git_format_config(const char *var, const char *value, void *cb)
485 add_header(value);
486 return 0;
487 }
492 - if (!strcmp(var, "format.suffix")) {
493 - if (!value)
494 - return config_error_nonbool(var);
495 - fmt_patch_suffix = xstrdup(value);
496 - return 0;
497 - }
488 + if (!strcmp(var, "format.suffix"))
489 + return git_config_string(&fmt_patch_suffix, var, value);
490 if (!strcmp(var, "format.cc")) {
491 if (!value)
492 return config_error_nonbool(var);