summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-11 18:56:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-11 21:11:37 (GMT)
commite08404a82d19a60fd60822e8c0d95dd5629e0809 (patch)
treefbdf1748be49f83e9c2dee7f0b34fae39d4458e7
parent64f30e948be5fb2cd2f65e91c0eab5ab4719c636 (diff)
downloadgit-e08404a82d19a60fd60822e8c0d95dd5629e0809.zip
git-e08404a82d19a60fd60822e8c0d95dd5629e0809.tar.gz
git-e08404a82d19a60fd60822e8c0d95dd5629e0809.tar.bz2
git.c: guard config parser from value=NULL
alias.* configuration expects a string value Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--git.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/git.c b/git.c
index 15fec89..0cb8688 100644
--- a/git.c
+++ b/git.c
@@ -93,6 +93,8 @@ static char *alias_string;
static int git_alias_config(const char *var, const char *value)
{
if (!prefixcmp(var, "alias.") && !strcmp(var + 6, alias_command)) {
+ if (!value)
+ return config_error_nonbool(var);
alias_string = xstrdup(value);
}
return 0;