Re: [PATCH v2 3/4] sideband: append suffix for message whose CR in next pktline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 15 Jun 2021, Jiang Xin wrote:

> Junio C Hamano <gitster@xxxxxxxxx> 于2021年6月15日周二 上午9:17写道:
> >
> > Jiang Xin <worldhello.net@xxxxxxxxx> writes:
> >
> > >     /*
> > >      * Let's insert a suffix to clear the end
> > >      * of the screen line, but only if current
> > >      * line data actually contains something.
> > >      */
> > >
> > > So my implementation is to try not to break the original
> > > implementation, and keep the linelen unchanged.
> >
> > I knew what you wanted to do from your code---I am questioning if
> > that "only when something is there" was really sensible, or if it
> > was just attracting bugs.
> >
> 
> @Nicolas, what's your opinion? Is it ok to add clear-to-eol suffix to
> each line even empty ones?

That would be the simplest thing to do.

But there must have been a reason for doing it otherwise. I just don't 
remember anymore.

Maybe it had to do with progress reporting that does a bunch of 
percentage updates followed by '\r' to remain on the same line, and at 
the end a single '\n' to move to the next line without erasing the final 
status report line. That would be a case for not clearing empty lines.


Nicolas

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux