summaryrefslogtreecommitdiff
path: root/builtin-log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 13:09:16 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-11 13:14:25 -0800
commit90f5c1864caf40ac2a0fef6bc771eab3ecc561b6 (patch)
tree9928088e3eebc582565d887e3d9650eb351f9108 /builtin-log.c
parent3c17c34ac79f58665db73deeb995bc070b7f1a2f (diff)
downloadgit-90f5c1864caf40ac2a0fef6bc771eab3ecc561b6.tar.gz
builtin-log.c: guard config parser from value=NULL
format.suffix expects a string value. format.numbered is bool plus "auto" Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 9458428a8b..99d69f0791 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -432,7 +432,7 @@ static int git_format_config(const char *var, const char *value)
}
if (!strcmp(var, "format.suffix")) {
if (!value)
- die("format.suffix without value");
+ return config_error_nonbool(var);
fmt_patch_suffix = xstrdup(value);
return 0;
}
@@ -440,11 +440,10 @@ static int git_format_config(const char *var, const char *value)
return 0;
}
if (!strcmp(var, "format.numbered")) {
- if (!strcasecmp(value, "auto")) {
+ if (value && !strcasecmp(value, "auto")) {
auto_number = 1;
return 0;
}
-
numbered = git_config_bool(var, value);
return 0;
}