summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 995c452)
raw | patch | inline | side by side (parent: 995c452)
author | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Feb 2008 18:50:06 +0000 (10:50 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Feb 2008 21:11:36 +0000 (13:11 -0800) |
gc.reflogexpire and gc.reflogexpireunreachable configuration expect
a string value suitable for calling approxidate() with.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
a string value suitable for calling approxidate() with.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-reflog.c | patch | blob | history |
diff --git a/builtin-reflog.c b/builtin-reflog.c
index e6834dd831e59b9a076305b0b7088ecdc9a2b3f1..4836ec951be727512bcd550dd3604c43c39aa557 100644 (file)
--- a/builtin-reflog.c
+++ b/builtin-reflog.c
@@ -307,13 +307,19 @@ static int collect_reflog(const char *ref, const unsigned char *sha1, int unused
static int reflog_expire_config(const char *var, const char *value)
{
- if (!strcmp(var, "gc.reflogexpire"))
+ if (!strcmp(var, "gc.reflogexpire")) {
+ if (!value)
+ config_error_nonbool(var);
default_reflog_expire = approxidate(value);
- else if (!strcmp(var, "gc.reflogexpireunreachable"))
+ return 0;
+ }
+ if (!strcmp(var, "gc.reflogexpireunreachable")) {
+ if (!value)
+ config_error_nonbool(var);
default_reflog_expire_unreachable = approxidate(value);
- else
- return git_default_config(var, value);
- return 0;
+ return 0;
+ }
+ return git_default_config(var, value);
}
static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)