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 <tobiasu@tmux.org> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tobias Ulmer committed
Sep 24, 2012 at 04:40 UTC
df995c7dd21bca9c61f9e5480fdfc1a015b4f1a0
2 files changed
+2
-5
builtin/gc.c
+1
-3
@@ -217,9 +217,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
217
*/
218
if (!need_to_gc())
219
return 0;
220
- if (quiet)
221
- fprintf(stderr, _("Auto packing the repository for optimum performance.\n"));
222
- else
220
+ if (!quiet)
221
fprintf(stderr,
222
_("Auto packing the repository for optimum performance. You may also\n"
223
"run \"git gc\" manually. See "
t/t5400-send-pack.sh
+1
-2
@@ -174,8 +174,7 @@ test_expect_success 'receive-pack runs auto-gc in remote repo' '
174
cd parent &&
175
echo "Even more text" >>file.txt &&
176
git commit -a -m "Third commit" &&
177
- git send-pack ../child HEAD:refs/heads/test_auto_gc >output 2>&1 &&
178
- grep "Auto packing the repository for optimum performance." output
177
+ git send-pack ../child HEAD:refs/heads/test_auto_gc
178
) &&
179
test ! -e child/.git/objects/tmp_test_object
180
'