From: Junio C Hamano Date: Mon, 11 Feb 2008 18:45:50 +0000 (-0800) Subject: builtin-branch.c: guard config parser from value=NULL X-Git-Tag: v1.5.4.2~47 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5768c98ab8892ee0ca46e23ed46c4d94e0503e72;p=git.git builtin-branch.c: guard config parser from value=NULL color.branch.* configuration variables expect a string value. Signed-off-by: Junio C Hamano --- diff --git a/builtin-branch.c b/builtin-branch.c index 089cae592..e414c8898 100644 --- a/builtin-branch.c +++ b/builtin-branch.c @@ -70,12 +70,15 @@ static int git_branch_config(const char *var, const char *value) } if (!prefixcmp(var, "color.branch.")) { int slot = parse_branch_color_slot(var, 13); + if (!value) + return config_error_nonbool(var); color_parse(value, var, branch_colors[slot]); return 0; } - if (!strcmp(var, "branch.autosetupmerge")) - branch_track = git_config_bool(var, value); - + if (!strcmp(var, "branch.autosetupmerge")) { + branch_track = git_config_bool(var, value); + return 0; + } return git_default_config(var, value); }