From: Tobias Ulmer Date: Mon, 24 Sep 2012 02:40:24 +0000 (+0200) Subject: silence git gc --auto --quiet output X-Git-Tag: v1.8.0-rc1~14^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=df995c7dd21bca9c61f9e5480fdfc1a015b4f1a0;p=git.git silence git gc --auto --quiet output When --quiet is requested, gc --auto should not display messages unless there is an error. Signed-off-by: Tobias Ulmer Acked-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/builtin/gc.c b/builtin/gc.c index 6d46608fc..6be6c8d65 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -217,9 +217,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix) */ if (!need_to_gc()) return 0; - if (quiet) - fprintf(stderr, _("Auto packing the repository for optimum performance.\n")); - else + if (!quiet) fprintf(stderr, _("Auto packing the repository for optimum performance. You may also\n" "run \"git gc\" manually. See " diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index 250c720c1..78ab17793 100755 --- a/t/t5400-send-pack.sh +++ b/t/t5400-send-pack.sh @@ -174,8 +174,7 @@ test_expect_success 'receive-pack runs auto-gc in remote repo' ' cd parent && echo "Even more text" >>file.txt && git commit -a -m "Third commit" && - git send-pack ../child HEAD:refs/heads/test_auto_gc >output 2>&1 && - grep "Auto packing the repository for optimum performance." output + git send-pack ../child HEAD:refs/heads/test_auto_gc ) && test ! -e child/.git/objects/tmp_test_object '