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

Re: [PATCH] Teach "git add -i" to colorize whitespace errors

From
Wincent Colaiuta <win@wincent.com>
Date
Dec 7, 2007, 13:00 UTC
Message-ID
<822D2B27-2280-4A53-A242-B69726CF129D@wincent.com>
In-Reply-To
<1197030910-29638-1-git-send-email-win@wincent.com>
El 7/12/2007, a las 13:35, Wincent Colaiuta escribió:
Show 10 quoted lines
> @@ -662,8 +648,10 @@ sub split_hunk {
> 			    (($n_cnt != 1) ? ",$n_cnt" : '') .
> 			    " @@\n");
> 		unshift @{$hunk->{TEXT}}, $head;
> +		unshift @{$hunk->{DISPLAY}},
> +		    $use_color ? (colored $fraginfo_color, $head) : $head;
> 	}
> -	return map { $_->{TEXT} } @split;
> +	return @split;
> }

Actually, $diff_use_color would probably be more appropriate than $use_color above.

Wincent
Previous: Wincent Colaiuta
Message 2 of 2 in “Teach "git add -i" to colorize whitespace errors”
  1. Teach "git add -i" to colorize whitespace errorsWincent Colaiuta, Dec 7, 2007
  2. Wincent ColaiutaDec 7, 2007

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.