summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 18:51:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-11 21:11:36 (GMT)
commit4f9c412bf778e091d06cd01376b64cef15e3954c (patch)
tree7f91fdfba29caf0aa1cccef1823e178704fc9b94
parent4f342b96d15205ec052e400f10121dd7cee39963 (diff)
downloadgit-4f9c412bf778e091d06cd01376b64cef15e3954c.zip
git-4f9c412bf778e091d06cd01376b64cef15e3954c.tar.gz
git-4f9c412bf778e091d06cd01376b64cef15e3954c.tar.bz2
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>
-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 6dc835d..019abd3 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);