Merge branch 'tu/gc-auto-quiet'
authorJunio C Hamano <gitster@pobox.com>
Wed, 3 Oct 2012 04:13:27 +0000 (21:13 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Oct 2012 04:13:27 +0000 (21:13 -0700)
"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

builtin/gc.c
t/t5400-send-pack.sh
index 6d46608fc9ffe45a9ebb7ebb4570e0b163455411..6be6c8d65b26c9149aac2b6c1de6e3217c6ceea7 100644 (file)
@@ -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 "
index 250c720c14602bdf21e6a7200437b13fe6feaca3..78ab17793894ed902468e1f7af5841b67eeef2ff 100755 (executable)
@@ -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
 '