git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "Sébastien BRUCKERT" <sebastien.bruckert@smile.fr>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Representation of diff with trailing spaces
Date: Thu, 26 Mar 2020 07:15:00 -0400	[thread overview]
Message-ID: <20200326111500.GB4193632@coredump.intra.peff.net> (raw)
In-Reply-To: <CABt=S26FB1zkwDCdmXeyVvFYvpvuGSX_y1Fg5N3K=yq0ZMyR7A@mail.gmail.com>

On Thu, Mar 26, 2020 at 12:07:55PM +0100, Sébastien BRUCKERT wrote:

> # 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

  reply	other threads:[~2020-03-26 11:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 11:07 [RFC] Representation of diff with trailing spaces Sébastien BRUCKERT
2020-03-26 11:15 ` Jeff King [this message]
2020-03-26 12:40   ` Sébastien BRUCKERT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200326111500.GB4193632@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=sebastien.bruckert@smile.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).