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

Re: [RFC] Representation of diff with trailing spaces

From
SBSébastien BRUCKERT <sebastien.bruckert@smile.fr>
Date
Mar 26, 2020, 12:40 UTC
Message-ID
<CABt=S24vy0QpuVHoXdzTcRb3r6mU1AdswrGxOPksdwdrBGpEBg@mail.gmail.com>
In-Reply-To
<20200326111500.GB4193632@coredump.intra.peff.net>
Show 13 quoted lines
> > # Abstract
> > Something that always bothered me with git diff was how trailing
> > spaces are represented. If I add spaces, then diff, they are
> > represented in the terminal by a red background. If I then remove
> > them, they are not represented. That's how I can have a diff with two
> > exact lines, and I'm looking for the diff in it, but can't find it.
> > Because it is the non-represented spaces.
>
> Have you tried setting diff.wsErrorHighlight? By default we only
> highlight whitespace problems in new lines, but it can be told to show
> them in old lines or in context.
>
> -Peff
Oh yes, that was what I was looking for, thank you Peff!
Well, if there is a config for it then, no need to change anything.
Previous: Jeff King
Message 3 of 3 in “[RFC] Representation of diff with trailing spaces”
  1. Sébastien BRUCKERTMar 26, 2020
  2. Jeff KingMar 26, 2020
  3. Sébastien BRUCKERTMar 26, 2020

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.