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

Re: RFC: git diff colorization idea

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 23, 2009, 18:40 UTC
Message-ID
<m3iqo5yiek.fsf@localhost.localdomain>
In-Reply-To
<53497057-1ADE-4300-9F35-B218959606FE@wincent.com>
Wincent Colaiuta <win@wincent.com> writes:
> Lately I've been wishing that Git's diff output were colorized in a
> way that combines the standard line-by-line colorizing with the word-
> by-word colorizing you get with --color-words.

I like this idea, also because Emacs ediff / ediff3 / emerge uses it, from what I understand under the name of 'refinement'.

Show 5 quoted lines
> 
> Pictures speak louder than words, so here are some to show what I mean:
> 
> http://www.flickr.com/photos/wincent-colaiuta/sets/72157612877491482/
>
[...]

There was some discussion in this thread on how to do this, whether with --refine / --color-chars we shoud ony highlight differences, or whether for example use reverse (i.e. background green or background red), or other red / other green, or perhaps bold, or perhaps underline to highlight regions in line which differ

> - Meld: http://meld.sourceforge.net/meld_file1.png

Not extremly good example, as it uses equivalent of context diff format (-,+,!) with added, removed and _changed_ lines, and not unified diff format (only added / removed lines).

> Would people be interested in seeing this feature go in? [...]
+1 from me
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Nanako Shiraishi
Message 6 of 6 in “RFC: git diff colorization idea”
  1. Wincent ColaiutaJan 23, 2009
  2. Junio C HamanoJan 23, 2009
  3. Wincent ColaiutaJan 23, 2009
  4. Junio C HamanoJan 23, 2009
  5. Nanako ShiraishiJan 23, 2009
  6. Jakub NarebskiJan 23, 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.