summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-10-02 21:13:27 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-10-02 21:13:27 -0700
commit9ac54d0f59978b92201e3ca728eed0ea7545667a (patch)
tree4698efc962d4ab9b4dc9be4c559a100c1924a3a8
parentMerge branch 'maint' (diff)
parentsilence git gc --auto --quiet output (diff)
downloadtgif-9ac54d0f59978b92201e3ca728eed0ea7545667a.tar.xz
Merge branch 'tu/gc-auto-quiet'
"gc --auto" notified the user that auto-packing has triggered even under the "--quiet" option. * tu/gc-auto-quiet: silence git gc --auto --quiet output
-rw-r--r--builtin/gc.c4
-rwxr-xr-xt/t5400-send-pack.sh3
2 files changed, 2 insertions, 5 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index 6d46608fc9..6be6c8d65b 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 250c720c14..78ab177938 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
'