summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-02-11 10:56:06 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-02-11 13:11:37 -0800
commite08404a82d19a60fd60822e8c0d95dd5629e0809 (patch)
treefbdf1748be49f83e9c2dee7f0b34fae39d4458e7
parentdiff.c: guard config parser from value=NULL (diff)
downloadtgif-e08404a82d19a60fd60822e8c0d95dd5629e0809.tar.xz
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 15fec8974a..0cb86884d7 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;