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

Re: [PATCH] diff: handle lines containing only whitespace better

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 20, 2010, 16:08 UTC
Message-ID
<7v4ocgx2we.fsf@alter.siamese.dyndns.org>
In-Reply-To
<780B144B-03E0-4ED5-8E92-D4EB3CBBBF71@sb.org>
Kevin Ballard <kevin@sb.org> writes:
> Incidentally, I just realized the description of the patch is slightly
> wrong. The problem only occurs when the line contains at least one
> tab...

That exactly is why I asked for tests, as I couldn't reproduce it from the description at all.

But I see it now.
	$ HT='   '
	$ mv Makefile Makefile+
        $ sed -e "3s/^.*/$HT/" Makefile+ >Makefile
        $ git diff --color
> ...Should I resend the patch with an updated description? I can also
> attempt to write tests if you can give me some guidance on how to deal
> with the need for ansi color codes.
This may show us a good starting point.
    $ git grep RED t/
Previous: Nazri RamliyNext: Kevin Ballard
Message 5 of 9 in “diff: handle lines containing only whitespace better”
  1. diff: handle lines containing only whitespace betterKevin Ballard, Oct 20, 2010
  2. Junio C HamanoOct 20, 2010
  3. Kevin BallardOct 20, 2010
  4. Nazri RamliyOct 20, 2010
  5. Junio C HamanoOct 20, 2010
  6. 1/2 test-lib: extend test_decode_color to handle more color codesKevin Ballard, Oct 20, 2010
  7. Junio C HamanoOct 20, 2010
  8. Kevin BallardOct 21, 2010
  9. 2/2 diff: handle lines containing only whitespace and tabs betterKevin Ballard, Oct 20, 2010

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.