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>
Junio C Hamano committed
Feb 11, 2008 at 10:51 UTC
4f9c412bf778e091d06cd01376b64cef15e3954c
1 file changed
+2
builtin-show-branch.c
+2
@@ -536,6 +536,8 @@ static void append_one_rev(const char *av)
536
static int git_show_branch_config(const char *var, const char *value)
537
{
538
if (!strcmp(var, "showbranch.default")) {
539
+ if (!value)
540
+ return config_error_nonbool(var);
541
if (default_alloc <= default_num + 1) {
542
default_alloc = default_alloc * 3 / 2 + 20;
543
default_arg = xrealloc(default_arg, sizeof *default_arg * default_alloc);