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

Re: [PATCH] t1092: use GIT_PROGRESS_DELAY for consistent results

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 24, 2021, 22:57 UTC
Message-ID
<87fsybohy5.fsf@evledraar.gmail.com>
In-Reply-To
<YKwd2e5VxVmU6zqj@nand.local>
On Mon, May 24 2021, Taylor Blau wrote:
Show 24 quoted lines
> On Mon, May 24, 2021 at 04:38:18PM -0400, Derrick Stolee wrote:
>> On 5/24/21 4:28 PM, Jonathan Nieder wrote:
>> > Hm, I think this test strategy is going to be fundamentally flaky
>> > regardless: Git doesn't intend to guarantee any kind of stability in
>> > the exact stderr output it writes.
>>
>> There are no expectations that stderr is stable across
>> versions of Git. These tests don't add friction to developers
>> making new features or changing the error messages that appear
>> over stderr. It's just that these tests should catch any
>> unintended inconsistency across these modes.
>
> I agree with Stolee that these tests are valuable for asserting that
> output is the consistent whether or not you are using the sparse index.
>
> I find setting GIT_PROGRESS_DELAY to a large number to a be a little
> ugly, but there isn't an apparent better way to accomplish the same
> thing. Of course, it would be nice to have an environment variable to
> specify where progress meters are written to, or a global option to
> disable progress meters altogether.
>
> But I don't think this isolated instance should push in the direction of
> adding support for either of the above, regardless of how easy it might
> be.

I don't see why we wouldn't just tweak GIT_PROGRESS_DELAY to support -1 or something for "inf".

It was added as a one-off (it seems for testing, but made public, so not in the GIT_TEST_* namespace) in 44a4693bfce (progress: create GIT_PROGRESS_DELAY, 2019-11-25).

The progress.c API will already nicely deal with this case if something in start_progress_delay() is made to return NULL if we pass a flag down to it.

Show 12 quoted lines
> What would perhaps make more sense is to silence the progress meters
> from the commands themselves. AFAICT the only command called by
> run_on_sparse() which generates a progress meter is 'git checkout',
> 'git merge', and 'git submodule', all of which support '--no-progress'.
> Might it be worth passing that option instead of setting
> GIT_PROGRESS_DELAY to a large value?
>
> (For what it's worth, I have no strong opinion either way, so I would be
> happy to attach my Reviewed-by to even the current version of this patch).
>
> Thanks,
> Taylor
Previous: Taylor BlauNext: Taylor Blau
Message 5 of 18 in “t1092: use GIT_PROGRESS_DELAY for consistent results”
  1. t1092: use GIT_PROGRESS_DELAY for consistent resultsDerrick Stolee via GitGitGadget, May 24, 2021
  2. Jonathan NiederMay 24, 2021
  3. Derrick StoleeMay 24, 2021
  4. Taylor BlauMay 24, 2021
  5. Ævar Arnfjörð BjarmasonMay 24, 2021
  6. Taylor BlauMay 25, 2021
  7. Derrick StoleeMay 25, 2021
  8. Junio C HamanoMay 25, 2021
  9. Derrick StoleeMay 25, 2021
  10. Junio C HamanoMay 25, 2021
  11. Junio C HamanoMay 25, 2021
  12. Taylor BlauMay 25, 2021
  13. Junio C HamanoMay 25, 2021
  14. Taylor BlauMay 25, 2021
  15. Ævar Arnfjörð BjarmasonMay 25, 2021
  16. Junio C HamanoMay 25, 2021
  17. Junio C HamanoMay 25, 2021
  18. Junio C HamanoMay 25, 2021

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.