summaryrefslogtreecommitdiff
path: root/builtin-log.c
diff options
context:
space:
mode:
authorBrian Hetro <whee@smaertness.net>2008-07-05 05:24:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-06 00:42:24 (GMT)
commit70cff3ac16e842e465f304e7af3b588840899dc9 (patch)
tree63f05d40f0f11d999b326f7ebfc6523808465b0e /builtin-log.c
parenta41a32bf1ce74f3be5c1ab398db1a93b89e6a99e (diff)
downloadgit-70cff3ac16e842e465f304e7af3b588840899dc9.zip
git-70cff3ac16e842e465f304e7af3b588840899dc9.tar.gz
git-70cff3ac16e842e465f304e7af3b588840899dc9.tar.bz2
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>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 9979e37..430d876 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -234,12 +234,8 @@ static int git_log_config(const char *var, const char *value, void *cb)
{
if (!strcmp(var, "format.pretty"))
return git_config_string(&fmt_pretty, var, value);
- if (!strcmp(var, "format.subjectprefix")) {
- if (!value)
- config_error_nonbool(var);
- fmt_patch_subject_prefix = xstrdup(value);
- return 0;
- }
+ if (!strcmp(var, "format.subjectprefix"))
+ return git_config_string(&fmt_patch_subject_prefix, var, value);
if (!strcmp(var, "log.date"))
return git_config_string(&default_date_mode, var, value);
if (!strcmp(var, "log.showroot")) {
@@ -489,12 +485,8 @@ static int git_format_config(const char *var, const char *value, void *cb)
add_header(value);
return 0;
}
- if (!strcmp(var, "format.suffix")) {
- if (!value)
- return config_error_nonbool(var);
- fmt_patch_suffix = xstrdup(value);
- return 0;
- }
+ if (!strcmp(var, "format.suffix"))
+ return git_config_string(&fmt_patch_suffix, var, value);
if (!strcmp(var, "format.cc")) {
if (!value)
return config_error_nonbool(var);