threads / patch / 11982

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

Subject: [PATCH] builtin-gc.c: guard config parser from value=NULL

## tl;dr

One message between Feb 9, 2008 and Feb 9, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Govind Salinas· Feb 9, 2008, 01:12 UTC · lore
Signed-off-by: Govind Salinas <blix@sophiasuchtig.com>
---
 builtin-gc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to builtin-gc.c +1 −1
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);
-- 
1.5.4.36.g9af61

← back to recent threads