Code

builtin-gc.c: guard config parser from value=NULL
authorMiklos Vajna <vmiklos@frugalware.org>
Fri, 8 Feb 2008 14:26:18 +0000 (15:26 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Feb 2008 21:11:36 +0000 (13:11 -0800)
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-gc.c

index ac34788c89c315d036ab041afbac91a0302e6d6a..ad4a75eedddb1dfc0ecef2b536727970335673f9 100644 (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);