builtin-gc.c: guard config parser from value=NULL

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Miklos Vajna 2008-02-08 15:26:18 +01:00 committed by Junio C Hamano
parent cc1816b0d6
commit c5e5a2c097

View File

@ -37,7 +37,7 @@ static const char *argv_rerere[] = {"rerere", "gc", NULL};
static int gc_config(const char *var, const char *value)
{
if (!strcmp(var, "gc.packrefs")) {
if (!strcmp(value, "notbare"))
if (value && !strcmp(value, "notbare"))
pack_refs = -1;
else
pack_refs = git_config_bool(var, value);