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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---

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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux