Re: Git trims the last character of content from remotes
- From
- Mikael Magnusson <mikachu@gmail.com>
- Date
- May 6, 2026, 09:40 UTC
- Message-ID
- <CAHYJk3SW-JwWwk2h=vfDQ4udwQoW2TrmcntiPVwjUJSGiLU2wQ@mail.gmail.com>
- In-Reply-To
- <CAHYJk3Q6xjW8mBvbQkN3vsDb2e9Em6PuDinFoTFwqkTXaKK=rQ@mail.gmail.com>
On Wed, May 6, 2026 at 11:37 AM Mikael Magnusson <mikachu@gmail.com> wrote:
Show 33 quoted lines
> > On Tue, May 5, 2026 at 9:46 PM René Scharfe <l.s.r@web.de> wrote: > > > > On 5/5/26 2:34 AM, Chris Torek wrote: > > > On Mon, May 4, 2026 at 10:02 AM Hugo Osvaldo Barrera <hugo@whynothugo.nl> wrote: > > > [snippage] > > >> When the width of a whole line is the same as my terminal width ... > > > [snippage] > > >> ... sideband.c prints ANSI_SUFFIX = "\033[K", this escape > > >> sequence being "clear the line from the current position until the end of the > > >> line", and this is the root cause of the issue. > > > > > If you have a non-empty prefix > > > string before this "clear to end of line" suffix, the solution is more > > > obvious: print the ESC [ K as a *prefix* rather than a suffix, but > > > that fails with the empty prefix. > > We do have a non-empty prefix, but why would it be necessary? What's > > wrong with clearing the full line starting from column 1? > > > > Anyway, do you mean something like this? > > If the purpose of the clear is to reset the background color on > wrapped lines, this will not have any effect, since you clear before > the new line is wrapped in. (This is a bit of an obscure edge case, if > you set the background color, and wrap the line, the entire new line > will be scrolled in with the active background color, then you write > perhaps 10 more characters and send the sequence to reset the > background color, but the entire rest of the line is still brown, or > whatever it was set to when you wrapped). > > Example command to reproduce locally, > % echo -e '\e[43maaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\e[0mhihi' > (Add more aaaaaaa if necessary so that the line breaks before they end).
Sorry for the double post, but I forgot an important thing, this only happens if you *actually* scroll in a new line, ie if you open a new terminal and run this, you won't see any problems until you get to the bottom of the screen.
-- Mikael Magnusson