Re: [PATCH] reflog expire: add progress output
- From
Jeff King <peff@peff.net>
- Date
- Sep 19, 2018, 19:01 UTC
- Message-ID
- <20180919190110.GA14552@sigill.intra.peff.net>
- In-Reply-To
- <87tvmljtaz.fsf@evledraar.gmail.com>
On Wed, Sep 19, 2018 at 07:22:44PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 11 quoted lines
> > Do we have --quiet option or something that needs to completely
> > suppress this progress thing?
>
> Yes. I also see my commit graph process patches sitting in "next" broke
> the "git gc --quiet" mode, and I'll need to submit something on top
> (which'll be easy), and submit a v2 on this (pending further
> comments...).
>
> Is there a better way to test that (fake up the file descriptor check)
> in the tests other than adding getenv("GIT_TEST...") to the progress.c
> logic?The progress code doesn't do the isatty() check at all. The caller has to do it (and ideally would respect --progress/--no-progress to override, along with having --quiet imply --no-progress if such an option exists).
Once you have all that, then you can test --progress explicitly. If you want to check the isatty() handling, you can use test_terminal().
-Peff