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

Re: RFC: git diff colorization idea

From
Nanako Shiraishi <nanako3@lavabit.com>
Date
Jan 23, 2009, 08:28 UTC
Message-ID
<20090123172809.6117@nanako3.lavabit.com>
In-Reply-To
<7vhc3q6evi.fsf@gitster.siamese.dyndns.org>
Quoting Junio C Hamano <gitster@pobox.com>:
Show 11 quoted lines
> If you were to go this route, I suspect that showing the unchanged part on
> the preimage line in light gray might make sense, like:
>
>   | _git_remote ()
>   | {
>   |-    <gray>local subcommands="add rm show prune<gray> <red>update</red>"
>   |+    local subcommands="add <green>rename</green> rm show prune"
>   |     local subcommand=$(__git_find_subcommand "$subcommands")"
>   |     if ...
>
> because there will be the same chars/words on the postimage line anyway.

I think this makes a lot more sense than any of the screenshot WIncent prepared on his web pages, and it is a much easier output for users to spot which word is different by not coloring the unchanged word at all.

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Previous: Junio C HamanoNext: Jakub Narebski
Message 5 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.