git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] "git log" command wraps lines not correctly while terminal width changed

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2022, 21:12 UTC
Message-ID
<xmqq4jyz62u0.fsf@gitster.g>
In-Reply-To
<YuRF7rSskqT2YkMs@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> On Fri, Jul 29, 2022 at 06:35:20PM +0400, Sergey Grunenko wrote:
>
>> Hi, developers. I met some small bug in console report of "git log" command
>
> I don't think this is a bug in git, because git isn't actually doing any
> wrapping.

We do measure the terminal width when we start and adjust the length of --stat and other things, but it does not affect the overall correctness of what you said. We just draw once, and never go back to redraw with updated width in response to SIGWINCH. After we emit our output, it is up to the pager and the terminal.

Show 9 quoted lines
> OK, so it sounds like you're probably seeing "less" get told by the
> terminal that the window size has changed, and it adapts.
> ...
> The mouse scroll wheel is presumably telling the terminal to move
> through its back-scroll. How it handles re-rendering of content that's
> only in the back-scroll is up to it, and totally outside the control of
> either git or the pager. It behaves as your 8a for me, using urxvt on
> Linux. You probably need to file a report with the provider of your
> terminal emulator.
Previous: Jeff King
Message 3 of 3 in “[BUG] "git log" command wraps lines not correctly while terminal width changed”
  1. Sergey GrunenkoJul 29, 2022
  2. Jeff KingJul 29, 2022
  3. Junio C HamanoJul 29, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.