From: Jeff King <peff@peff.net>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, mflaschen@wikimedia.org
Subject: Re: [PATCH 2/2] fetch: silence git-gc if --quiet is given
Date: Thu, 14 Aug 2014 15:56:15 -0400 [thread overview]
Message-ID: <20140814195615.GB19337@peff.net> (raw)
In-Reply-To: <1408017065-17437-2-git-send-email-pclouds@gmail.com>
On Thu, Aug 14, 2014 at 06:51:05PM +0700, Nguyễn Thái Ngọc Duy wrote:
> Noticed-by: Matthew Flaschen <mflaschen@wikimedia.org>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> builtin/fetch.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index 9394194..4ff4080 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -1197,6 +1197,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
> string_list_clear(&list, 0);
>
> argv_array_pushl(&argv_gc_auto, "gc", "--auto", NULL);
> + if (verbosity < 0)
> + argv_array_push(&argv_gc_auto,"--quiet");
> run_command_v_opt(argv_gc_auto.argv, RUN_GIT_CMD);
I think this is a fine fix for this specific problem, and we should
apply it. But I do wonder if it would be simpler in the long run to
treat verbosity as a global option, and pass it around via a GIT_QUIET
(or GIT_VERBOSITY) environment variable.
I would not be surprised at all to find that there are other cases where
sub-programs do not respect the parent verbosity (I know we have had
problems with progress reporting flags carried over the transport
interface in the past, but I think we fixed all of those).
-Peff
next prev parent reply other threads:[~2014-08-14 19:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-14 11:51 [PATCH 1/2] fetch: convert argv_gc_auto to struct argv_array Nguyễn Thái Ngọc Duy
2014-08-14 11:51 ` [PATCH 2/2] fetch: silence git-gc if --quiet is given Nguyễn Thái Ngọc Duy
2014-08-14 19:56 ` Jeff King [this message]
2014-08-15 12:09 ` Duy Nguyen
2014-08-14 19:53 ` [PATCH 1/2] fetch: convert argv_gc_auto to struct argv_array Jeff King
2014-08-16 1:19 ` [PATCH v2 " Nguyễn Thái Ngọc Duy
2014-08-16 1:19 ` [PATCH v2 2/2] fetch: silence git-gc if --quiet is given Nguyễn Thái Ngọc Duy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140814195615.GB19337@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=mflaschen@wikimedia.org \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).