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

Trailing whitespace on git diff output.

From
AFAdria Farres <14farresa@gmail.com>
Date
Sep 1, 2014, 17:47 UTC
Message-ID
<20140901174709.GA23397@vimeitor>
Hello,

Today, while redirecting git diff's output to a text file, I noticed git diff leaves a trailing whitespace between different deltas of the same file (the line that separates two different deltas). For example, committing a file with the following content: --- test

test ---

then changing it to the following: --- test test

test test ---

committing and diffing it, leaves a trailing whitespace on line 8 of the diff output.

Is that expected behavior? I'm using git 2.1.0.
Sorry for taking your time,
Adria
Next: Matthieu Moy
Message 1 of 2 in “Trailing whitespace on git diff output.”
  1. Adria FarresSep 1, 2014
  2. Matthieu MoySep 1, 2014

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.