summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-02-08 14:26:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-11 21:11:36 (GMT)
commitc5e5a2c097240e7d51374eef398d388c5ee5cc9b (patch)
treec0d8574d421592fb808d70aee5460eb656388d20
parentcc1816b0d64a2aa3d6c32d642c3b403f8625c484 (diff)
downloadgit-c5e5a2c097240e7d51374eef398d388c5ee5cc9b.zip
git-c5e5a2c097240e7d51374eef398d388c5ee5cc9b.tar.gz
git-c5e5a2c097240e7d51374eef398d388c5ee5cc9b.tar.bz2
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>
-rw-r--r--builtin-gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-gc.c b/builtin-gc.c
index ac34788..ad4a75e 100644
--- a/builtin-gc.c
+++ b/builtin-gc.c
@@ -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);