summaryrefslogtreecommitdiff
path: root/builtin-show-branch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 10:51:03 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-11 13:11:36 -0800
commit4f9c412bf778e091d06cd01376b64cef15e3954c (patch)
tree7f91fdfba29caf0aa1cccef1823e178704fc9b94 /builtin-show-branch.c
parent4f342b96d15205ec052e400f10121dd7cee39963 (diff)
downloadgit-4f9c412bf778e091d06cd01376b64cef15e3954c.tar.gz
builtin-show-branch.c: guard config parser from value=NULL
showbranch.default configuration expects a string value. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-show-branch.c')
-rw-r--r--builtin-show-branch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-show-branch.c b/builtin-show-branch.c
index 6dc835d30a..019abd3527 100644
--- a/builtin-show-branch.c
+++ b/builtin-show-branch.c
@@ -536,6 +536,8 @@ static void append_one_rev(const char *av)
static int git_show_branch_config(const char *var, const char *value)
{
if (!strcmp(var, "showbranch.default")) {
+ if (!value)
+ return config_error_nonbool(var);
if (default_alloc <= default_num + 1) {
default_alloc = default_alloc * 3 / 2 + 20;
default_arg = xrealloc(default_arg, sizeof *default_arg * default_alloc);