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

Re: [Bug?] "diff -B --color" output doesn't show space errors

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2009, 04:44 UTC
Message-ID
<7vvdjk95qi.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20090915123456.6117@nanako3.lavabit.com>
Nanako Shiraishi <nanako3@lavabit.com> writes:
> I wanted to try this -B option, and wrote a little test program.
>
> While it shows correctly that the file was rewritten, it doesn't
> point out various whitespace mistakes in the file anymore.

As you included the trailing blank lines, I assume you are running 'next'.

The code to emit complete rewrite patch hasn't changed much since it was written, and I do not think it is aware of any whitespace error checking, let alone the "trailing blank lines", which is pretty new for even the regular diff codepath.

But a more interesting thing about your test program is that it exposes to a bug in the new code in next. Let me cook up a patch to fix that issue first, and then build probably a few more patches on it to add whitespace error highlighting to the complete-rewrite codepath.

Previous: Nanako ShiraishiNext: Junio C Hamano
Message 6 of 7 in “rename tracking and file-name swapping”
  1. Yuri D'EliaSep 13, 2009
  2. Junio C HamanoSep 13, 2009
  3. Yuri D'EliaSep 13, 2009
  4. Johannes SixtSep 14, 2009
  5. [Bug?] "diff -B --color" output doesn't show space errorsNanako Shiraishi, Sep 15, 2009
  6. Junio C HamanoSep 15, 2009
  7. diff --whitespace: fix blank lines at endJunio C Hamano, Sep 15, 2009

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.