зеркало из https://github.com/microsoft/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 <tobiasu@tmux.org> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
b5d156c362
Коммит
df995c7dd2
|
@ -217,9 +217,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
|
||||||
*/
|
*/
|
||||||
if (!need_to_gc())
|
if (!need_to_gc())
|
||||||
return 0;
|
return 0;
|
||||||
if (quiet)
|
if (!quiet)
|
||||||
fprintf(stderr, _("Auto packing the repository for optimum performance.\n"));
|
|
||||||
else
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("Auto packing the repository for optimum performance. You may also\n"
|
_("Auto packing the repository for optimum performance. You may also\n"
|
||||||
"run \"git gc\" manually. See "
|
"run \"git gc\" manually. See "
|
||||||
|
|
|
@ -174,8 +174,7 @@ test_expect_success 'receive-pack runs auto-gc in remote repo' '
|
||||||
cd parent &&
|
cd parent &&
|
||||||
echo "Even more text" >>file.txt &&
|
echo "Even more text" >>file.txt &&
|
||||||
git commit -a -m "Third commit" &&
|
git commit -a -m "Third commit" &&
|
||||||
git send-pack ../child HEAD:refs/heads/test_auto_gc >output 2>&1 &&
|
git send-pack ../child HEAD:refs/heads/test_auto_gc
|
||||||
grep "Auto packing the repository for optimum performance." output
|
|
||||||
) &&
|
) &&
|
||||||
test ! -e child/.git/objects/tmp_test_object
|
test ! -e child/.git/objects/tmp_test_object
|
||||||
'
|
'
|
||||||
|
|
Загрузка…
Ссылка в новой задаче