git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] reflog expire: add progress output

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 19, 2018, 20:16 UTC
Message-ID
<87r2hpjl8p.fsf@evledraar.gmail.com>
In-Reply-To
<20180919190110.GA14552@sigill.intra.peff.net>
On Wed, Sep 19 2018, Jeff King wrote:
Show 18 quoted lines
> On Wed, Sep 19, 2018 at 07:22:44PM +0200, Ævar Arnfjörð Bjarmason wrote:
>
>> > 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).

Yeah, what I was confused by was testing this with "git gc", and until my recent commit graph progress patches + this (which I wasn't testing against) the progress output was all from pack-objects, which checks the --progress option, and then proceeds to ignore all of that and just check isatty().

> Once you have all that, then you can test --progress explicitly. If you
> want to check the isatty() handling, you can use test_terminal().
Thanks.
Previous: Jeff KingNext: Duy Nguyen
Message 5 of 7 in “reflog expire: add progress output”
  1. reflog expire: add progress outputÆvar Arnfjörð Bjarmason, Sep 19, 2018
  2. Duy NguyenSep 19, 2018
  3. Ævar Arnfjörð BjarmasonSep 19, 2018
  4. Jeff KingSep 19, 2018
  5. Ævar Arnfjörð BjarmasonSep 19, 2018
  6. Duy NguyenSep 20, 2018
  7. Eric SunshineSep 21, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.