summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 65aa530)
raw | patch | inline | side by side (parent: 65aa530)
author | Junio C Hamano <gitster@pobox.com> | |
Mon, 17 Sep 2007 07:37:06 +0000 (00:37 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 18 Sep 2007 06:12:15 +0000 (23:12 -0700) |
That is where we decide if we are going to run gc
automatically.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
automatically.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-gc.c | patch | blob | history |
diff --git a/builtin-gc.c b/builtin-gc.c
index 093b3dda9ff7c70accdd8eb170885853215c5800..f046a2a66579bafd4f705f56838ed8ab3752890e 100644 (file)
--- a/builtin-gc.c
+++ b/builtin-gc.c
int num_loose = 0;
int needed = 0;
+ /*
+ * Setting gc.auto to 0 or negative can disable the
+ * automatic gc
+ */
+ if (gc_auto_threshold <= 0)
+ return 0;
+
if (sizeof(path) <= snprintf(path, sizeof(path), "%s/17", objdir)) {
warning("insanely long object directory %.*s", 50, objdir);
return 0;
continue;
}
if (!strcmp(arg, "--auto")) {
- if (gc_auto_threshold <= 0)
- return 0;
auto_gc = 1;
continue;
}