Re: [PATCH 6/7] [RFC] entry: don't show "Filtering content: ... done." line in case of errors
- From
René Scharfe <l.s.r@web.de>
- Date
- Jun 21, 2021, 18:32 UTC
- Message-ID
- <85ff4cb1-f3e3-4fcb-d9d8-fd294e0df451@web.de>
- In-Reply-To
- <20210620200303.2328957-7-szeder.dev@gmail.com>
Am 20.06.21 um 22:03 schrieb SZEDER Gábor:
Show 11 quoted lines
> RFC!! Alas, not calling stop_progress() on error has drawbacks: > > - All memory allocated for the progress bar is leaked. > - This progress line remains "active", in the sense that if we were > to start a new progress later in the same git process, then with > GIT_TEST_CHECK_PROGRESS it would trigger the other BUG() catching > nested/overlapping progresses. > > Do we care?! TBH I don't :) > Anyway, if we do, then we might need some sort of an abort_progress() > function...
I think the abort_progress() idea makes sense; to clean up allocations, tell the user what happened and avoid the BUG(). Showing just "aborted" instead of "done" should suffice here -- the explanation is given a few lines later ("'foo' was not filtered properly").
It could be a cheesy stop_progress_msg() wrapper that temporarily sets test_check_progress to zero..
René