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

Re: Adding color to git diff output.

From
Junio C Hamano <junkio@cox.net>
Date
Apr 11, 2006, 23:12 UTC
Message-ID
<7virpf4sg4.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<BAYC1-PASMTP08B0DB32592225AAD0838AAECD0@CEZ.ICE>
sean <seanlkml@sympatico.ca> writes:
Show 5 quoted lines
> Linus posted a colorize program a while back[1] but it wasn't taken into git.  
> The patch below takes a different approach, adding a GIT_DIFF_PAGER variable.
> You can use it by assigning a filter to the environment variable, like so:
>
> export GIT_DIFF_PAGER="colordiff | less -RS"

Sounds like a nice idea, even maybe suitable in a FAQ. Unfortunately colordiff does not seem to grok diff --cc output, but that is fine ;-).

Previous: seanNext: Linus Torvalds
Message 2 of 9 in “Adding color to git diff output.”
  1. seanApr 11, 2006
  2. Junio C HamanoApr 11, 2006
  3. Linus TorvaldsApr 12, 2006
  4. seanApr 12, 2006
  5. Linus TorvaldsApr 12, 2006
  6. Alex RiesenApr 12, 2006
  7. Linus TorvaldsApr 12, 2006
  8. Alex RiesenApr 12, 2006
  9. Junio C HamanoApr 12, 2006

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.