@matheusbsbs / matheus-bagliano / commits / c5e5a2c097
Fork 0

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>

Miklos Vajna committed Feb 8, 2008 at 15:26 UTC c5e5a2c097240e7d51374eef398d388c5ee5cc9b
1 file changed +1 -1
builtin-gc.c
+1 -1
@@ -37,7 +37,7 @@ static const char *argv_rerere[] = {"rerere", "gc", NULL};
37 static int gc_config(const char *var, const char *value)
38 {
39 if (!strcmp(var, "gc.packrefs")) {
40 - if (!strcmp(value, "notbare"))
40 + if (value && !strcmp(value, "notbare"))
41 pack_refs = -1;
42 else
43 pack_refs = git_config_bool(var, value);