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

Re: BUG: CR marker ^M doesn't show up in '-' lines of diffs when the ending of the removed line is CR+LF

From
Johannes Sixt <j6t@kdbg.org>
Date
Nov 26, 2018, 19:49 UTC
Message-ID
<f06b734a-fc8e-221a-c983-f2ab9daba17f@kdbg.org>
In-Reply-To
<xmqqzhtwzghr.fsf@gitster-ct.c.googlers.com>
Am 26.11.18 um 04:04 schrieb Junio C Hamano:
Show 9 quoted lines
> It appears to me that what Frank sees is not "^M highlighted for
> whitespace breakage appears only on postimage lines, while ^M is
> shown but not highlighted on preimage lines".  My reading of the
> above is "Not just without highlight, ^M is just *NOT* shown on the
> preimage line".
> 
> That does not sound right.  I would understand it if both lines
> showed ^M at the end, and only the one on the postimage line had it
> highlighted as a trailing-whitespace.
I agree that this is a (small?) weakness. But...
> When we are producing a colored output, we know we are *not* writing
> for machines, so one way to do it would be to turn CR at the end of
> the line into two letter "^" "M" sequence on our end, without relying
> on the terminal and/or the pager.  I dunno.

... this goes too far, IMO. It is the pager's task to decode control characters.

-- Hannes
Previous: brian m. carlsonNext: Junio C Hamano
Message 10 of 23 in “BUG: CR marker ^M doesn't show up in '-' lines of diffs when the ending of the removed line is CR+LF”
  1. Frank SchäferNov 23, 2018
  2. Johannes SixtNov 23, 2018
  3. Frank SchäferNov 24, 2018
  4. Torsten BögershausenNov 24, 2018
  5. Johannes SixtNov 24, 2018
  6. Frank SchäferNov 25, 2018
  7. Johannes SixtNov 25, 2018
  8. Junio C HamanoNov 26, 2018
  9. brian m. carlsonNov 25, 2018
  10. Johannes SixtNov 26, 2018
  11. Junio C HamanoNov 26, 2018
  12. Johannes SixtNov 27, 2018
  13. Frank SchäferNov 27, 2018
  14. Junio C HamanoNov 29, 2018
  15. Frank SchäferDec 2, 2018
  16. Johannes SixtDec 2, 2018
  17. Frank SchäferDec 5, 2018
  18. Johannes SixtDec 5, 2018
  19. Junio C HamanoDec 3, 2018
  20. Frank SchäferDec 5, 2018
  21. Junio C HamanoDec 6, 2018
  22. Frank SchäferDec 6, 2018
  23. Frank SchäferNov 27, 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.