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

Re: git-diff cr/nl files on linux

From
Junio C Hamano <gitster@pobox.com>
Date
May 26, 2008, 04:37 UTC
Message-ID
<7vskw5el55.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<fcaeb9bf0805252115q60f784aax6b1f267c476960b4@mail.gmail.com>
"Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:
Show 6 quoted lines
> On Sat, May 24, 2008 at 8:01 PM, Dirk Süsserott <newsletter@dirk.my1.cc> wrote:
> ...
>> What about 'git diff -w'? It drops any whitespace changes, including ^M's.
>> Not sure whether that is what you meant.
>
> That won't help.

Just like GNU diff, the only thing -w (and -b) does is to omit hunks whose changes consist of _only whitespace changes_ and nothing else.

In your quoted example, you have changes other than whitespace changes, so it is unsurprising that you will see the whole change, together with your whitespace changes.

Previous: Nguyen Thai Ngoc DuyNext: Johannes Sixt
Message 4 of 6 in “git-diff cr/nl files on linux”
  1. Nguyen Thai Ngoc DuyMay 24, 2008
  2. Dirk SüsserottMay 24, 2008
  3. Nguyen Thai Ngoc DuyMay 26, 2008
  4. Junio C HamanoMay 26, 2008
  5. Johannes SixtMay 26, 2008
  6. Nguyen Thai Ngoc DuyMay 26, 2008

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.