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

Re: how to ignore whitespace changes with --color-moved (git diff move detection)?

From
Jeff King <peff@peff.net>
Date
Feb 2, 2018, 06:51 UTC
Message-ID
<20180202065146.GA16533@sigill.intra.peff.net>
In-Reply-To
<CANri+EwfsgS-s0TeeX0E6XoCnmCeq=CB0UDQ9=gjSXbe8C_5GQ@mail.gmail.com>
On Thu, Feb 01, 2018 at 06:13:52PM -0800, Timothee Cour wrote:
Show 9 quoted lines
> this PR from october 2017 was discussing a patch that'd introduce
> `--color-moved-[no-]ignore-space-change`
> https://public-inbox.org/git/20171025224620.27657-3-sbeller@google.com/
> 
> however not sure what happened since then as I can't find in `git help
> diff` options even after `brew install --HEAD git`
> 
> it's a really useful feature as it's a common use case (ppl move
> blocks and reformat in same PR)

I think you can still do "--color-moved -w" to ignore whitespace. It's just that the defaults did not end up getting flipped.

-Peff
Previous: Timothee CourNext: Stefan Beller
Message 2 of 3 in “how to ignore whitespace changes with --color-moved (git diff move detection)?”
  1. Timothee CourFeb 2, 2018
  2. Jeff KingFeb 2, 2018
  3. Stefan BellerFeb 2, 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.