All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Sean Allred <allred.sean@gmail.com>
Cc: Lars Schneider <larsxschneider@gmail.com>, git@vger.kernel.org
Subject: Re: Bug report: 'filtering content' delayed progress message does not respect --quiet
Date: Fri, 26 Mar 2021 04:31:44 -0400	[thread overview]
Message-ID: <YF2b8LLhE0vjc7mg@coredump.intra.peff.net> (raw)
In-Reply-To: <CABceR4ZFVW=zeSwef7_dP+TWZ29J7BUkmMEB1CzCz=et_yYS9w@mail.gmail.com>

On Sun, Mar 21, 2021 at 03:53:07PM -0500, Sean Allred wrote:

> What did you do before the bug happened? (Steps to reproduce your issue)
> 
>   Called `git clone --quiet git://path/to/private/repo`
> 
> What did you expect to happen? (Expected behavior)
> 
>   Expected git to be quiet :-)  Did not expect writes to stderr/stdout.
> 
> What happened instead? (Actual behavior)
> 
>   Received output that looked like
> 
>       Filtering content:  --% (--/--), --.-- MiB | --.-- MiB/s

+cc Lars, who added this in 52f1d62eb4 (convert: display progress for
filtered objects that have been delayed, 2017-08-20).

The message is in finish_delayed_checkout(), which gets only a "struct
checkout" to carry the state. That has a "quiet" field, but I'm not sure
it is set appropriately. E.g., builtin/checkout.c's checkout_worktree()
does not set it at all, and it is unconditionally set in unpack-trees.c's
check_updates().

We should obviously be respecting --quiet, but also checking isatty(2)
before auto-enabling. Probably we need a separate show_progress field.
For unpack-trees, I think it would get set from o->verbose_update, which
is what controls the existing "Updating files" meter. For checkout.c, it
probably comes from checkout_opts.show_progress.

-Peff

  reply	other threads:[~2021-03-26  8:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-21 20:53 Bug report: 'filtering content' delayed progress message does not respect --quiet Sean Allred
2021-03-26  8:31 ` Jeff King [this message]
2021-08-25 18:15   ` [PATCH] checkout: make delayed checkout respect --quiet and --no-progress Matheus Tavares
2021-08-25 23:35     ` Ævar Arnfjörð Bjarmason
2021-08-26 14:26       ` Matheus Tavares Bernardino
2021-08-27  2:26         ` Jeff King
2021-08-26 19:10     ` [PATCH v2] " Matheus Tavares

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=YF2b8LLhE0vjc7mg@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=allred.sean@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=larsxschneider@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.