summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8753941)
raw | patch | inline | side by side (parent: 8753941)
author | David Bryson <david@statichacks.org> | |
Tue, 30 Sep 2008 20:28:58 +0000 (13:28 -0700) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 30 Sep 2008 20:41:50 +0000 (13:41 -0700) |
Signed-off-by: David Bryson <david@statichacks.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
builtin-gc.c | patch | blob | history |
diff --git a/builtin-gc.c b/builtin-gc.c
index fac200e0b08360625afc81b02913128c9b87f486..7af65bb31bfbf3e9a0e47901d44168389d736d20 100644 (file)
--- a/builtin-gc.c
+++ b/builtin-gc.c
static int aggressive_window = -1;
static int gc_auto_threshold = 6700;
static int gc_auto_pack_limit = 50;
-static char *prune_expire = "2.weeks.ago";
+static const char *prune_expire = "2.weeks.ago";
#define MAX_ADD 10
static const char *argv_pack_refs[] = {"pack-refs", "--all", "--prune", NULL};
return 0;
}
if (!strcmp(var, "gc.pruneexpire")) {
- if (!value)
- return config_error_nonbool(var);
- if (strcmp(value, "now")) {
+ if (value && strcmp(value, "now")) {
unsigned long now = approxidate("now");
if (approxidate(value) >= now)
return error("Invalid %s: '%s'", var, value);
}
- prune_expire = xstrdup(value);
- return 0;
+ return git_config_string(&prune_expire, var, value);
}
return git_default_config(var, value, cb);
}