Re: [PATCH v2 3/4] rebase: fix garbled progress display with '-x'
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jun 11, 2019, 21:11 UTC
- Message-ID
- <20190611211151.GG4012@szeder.dev>
- In-Reply-To
- <xmqq36kflv0f.fsf@gitster-ct.c.googlers.com>
On Tue, Jun 11, 2019 at 01:36:16PM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> SZEDER Gábor <szeder.dev@gmail.com> writes: > > > -Rebasing (1/4)QRebasing (2/4)QRebasing (3/4)QRebasing (4/4)QSuccessfully rebased and updated refs/heads/missing-commit. > > +Rebasing (1/4)QRebasing (2/4)QRebasing (3/4)QRebasing (4/4)QQ QSuccessfully rebased and updated refs/heads/missing-commit. > > EOF > > Yuck,
Oh yeah...
>... but I do not see how else/better this test can be written > myself, which makes it a double-yuck X-<
Perhaps hiding those spaces behind a helper variable e.g. 'dump_term_clear_line=Q<80-spaces>Q' and embedding that in the here docs specifying the expected output in these three tests could make it ever so slightly less yuck...
> Are we forcing out test to operate under dumb terminal mode and with > a known number of columns?
'test-lib.sh' sets TERM=dumb relatively early on, and in these tests we don't use 'test_terminal' to run 'git rebase', so... yeah. And term_columns() defaults to 80.
However, if the terminal were smart, then we would have to deal with ANSI escape suddenly popping up...