Thread (95 messages) flat view 95 messages, 33 authors, 2016-06-15
STALE3706d

[PATCH] Add a message explaining that automatic GC is about to start

From: <hidden>
Date: 2016-06-15 22:43:42
Subsystem: the rest · Maintainer: Linus Torvalds

---

On Wed, Oct 17, 2007 at 11:23:07PM -0400, Jeff King wrote:
It would have been nicer if it said something like "Your repository
looks crufty. Running git-gc --auto..." using whatever terms users would
be comfortable with. Instead, it just started with "Counting objects"
and a long wait.
And as an added bonus, we can tell people how to turn off automatic GC
and how to invoke it by hand.

 builtin-gc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/builtin-gc.c b/builtin-gc.c
index 23ad2b6..b1159d6 100644
--- a/builtin-gc.c
+++ b/builtin-gc.c
@@ -211,6 +211,10 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
 		prune = 0;
 		if (!need_to_gc())
 			return 0;
+		fprintf(stderr, "Packing your repository for optimum "
+			"performance. If you would rather run\n"
+			"\"git gc\" by hand, run \"git config gc.auto 0\" "
+			"to disable automatic cleanup.\n");
 	}
 
 	if (pack_refs && run_command_v_opt(argv_pack_refs, RUN_GIT_CMD))
-- 
1.5.3.rc2.4.g726f9
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help