Re: [PATCH v3 10/10] progress.c: add & assert a "global_progress" variable
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 25, 2021, 09:38 UTC
- Message-ID
- <xmqq35op4f7n.fsf@gitster.g>
- In-Reply-To
- <20211025050202.GC2101@szeder.dev>
SZEDER Gábor <szeder.dev@gmail.com> writes:
Show 6 quoted lines
> I still very much dislike the idea of a BUG() in the progress code > that can trigger outside of the test suite, because the progress line > is only a UI gimmick and not a crucial part of any Git operation, and > even though a progress line might be buggy, the underlying Git > operation is not affected by it and would still finish successfully, > as was the case with the dozen of so progress line bugs in the past.
I too recall that we have fixed numerous bugs in the past year in the area, but weren't they kind of obvious ones _once_ they are pointed out at you (e.g. progress never reaching to 100%)? Yet the developers have failed to catch them because their eyes would coast over without paying attention to them, exactly because the progress bar is merely a UI gimmick.
I haven't formed a firm opinion on this yet, but I think the idea behind these BUG() is to help such problems be caught while they are still in the lab. You may not notice when your live progress bar behaved a bit funny, but if you hit a BUG(), that would be squarely in your face and you cannot ignore it.