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

Re: Difficulty with parsing colorized diff output

From
Jeff King <peff@peff.net>
Date
Dec 12, 2018, 12:49 UTC
Message-ID
<20181212124908.GA5380@sigill.intra.peff.net>
In-Reply-To
<EB1AF739-F97B-4905-9736-2A003722AD9A@gmail.com>
On Tue, Dec 11, 2018 at 11:41:18AM -0500, George King wrote:
Show 10 quoted lines
> I first started playing around with terminal colors about 5 years ago,
> and I recall learning the hard way that Apple Terminal at least
> behaves very strangely when you have background colors cross line
> boundaries: background colors disappeared when I scrolled lines back
> into view. I filed a bug thinking it couldn't be right and Apple
> closed it as behaving according to compatibility expectations. I never
> figured out whether they had misunderstood my report or if old
> terminals were just that crazy. Instead I decided that the safe thing
> to do was reset after every line. Perhaps some git author reached the
> same conclusion.

Yes, that's exactly it. Certain codes do not do well as they cross lines. It's been long enough that I don't remember the details, and a quick grep of the archive found too many results for me to bother wading through.

-Peff
Previous: Jeff King
Message 10 of 10 in “Difficulty with parsing colorized diff output”
  1. George KingDec 8, 2018
  2. Jeff KingDec 8, 2018
  3. Stefan BellerDec 11, 2018
  4. Jeff KingDec 11, 2018
  5. George KingDec 11, 2018
  6. Ævar Arnfjörð BjarmasonDec 11, 2018
  7. George KingDec 11, 2018
  8. George KingDec 11, 2018
  9. Jeff KingDec 12, 2018
  10. Jeff KingDec 12, 2018

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.