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

Re: [PATCH] Give the hunk comment its own color

From
Jeff King <peff@peff.net>
Date
Nov 18, 2009, 14:23 UTC
Message-ID
<20091118142320.GA1220@coredump.intra.peff.net>
In-Reply-To
<1258543836-799-1-git-send-email-bert.wesarg@googlemail.com>
On Wed, Nov 18, 2009 at 12:30:36PM +0100, Bert Wesarg wrote:
Show 8 quoted lines
> Insired by the coloring of quilt.
> 
> Introduce a separate color for the hunk comment part, i.e. the current
> function.  Whitespace between hunk header and hunk comment is now
> printed as plain.
> 
> The current default is magenta. But I'm not settled on this. My
> favorite would be bold yellow.

I don't see any reason not to add this, as it is simply introducing one extra knob to tweak for people who care. However, after some experimentation, I found that I don't personally really like it. I ended up wanting it set to the same color as the hunk header.

I wonder how hard it would be to make it backwards-compatible; that is, to inherit the color value of the hunk header (be it the original or one set by the user) unless the func color is set by the user. But maybe that is over-engineering. It is not like we are breaking scripts, and it is not that hard for people to see the new behavior and then tweak their config if they don't like it.

-Peff

PS I almost complained about your default of "magenta" as the same as the meta color before I remembered that magenta meta is a personal setting I use. Personally I find the bold meta color to be distractingly ugly. Blaming it, the default seems to come from Linus, who even in his commit message (50f575f) seems to indicate that it is somewhat arbitrary (mostly just dropping the purple from the bold purple).

I'm not sure what is the best way to arrive at a default color for something like this. Arguing about it really is almost the definition of bikeshedding. Maybe next year's git survey should contain a special section on colors, and majority should rule. :)

Previous: Bert WesargNext: Bert Wesarg
Message 4 of 28 in “Give the hunk comment its own color”
  1. Give the hunk comment its own colorBert Wesarg, Nov 18, 2009
  2. Tay Ray ChuanNov 18, 2009
  3. Bert WesargNov 18, 2009
  4. Jeff KingNov 18, 2009
  5. Bert WesargNov 18, 2009
  6. Junio C HamanoNov 18, 2009
  7. Jeff KingNov 18, 2009
  8. Bert WesargNov 26, 2009
  9. Junio C HamanoNov 27, 2009
  10. Bert WesargNov 27, 2009
  11. Jeff KingNov 27, 2009
  12. Junio C HamanoNov 27, 2009
  13. Give the hunk comment its own colorBert Wesarg, Nov 27, 2009
  14. Junio C HamanoNov 27, 2009
  15. Bert WesargNov 27, 2009
  16. Junio C HamanoNov 27, 2009
  17. Junio C HamanoNov 28, 2009
  18. Bert WesargNov 28, 2009
  19. Bert WesargNov 30, 2009
  20. Junio C HamanoNov 30, 2009
  21. Bert WesargNov 30, 2009
  22. Junio C HamanoNov 30, 2009
  23. Sverre RabbelierNov 30, 2009
  24. Junio C HamanoNov 30, 2009
  25. Sverre RabbelierNov 30, 2009
  26. Give the hunk comment its own colorBert Wesarg, Nov 18, 2009
  27. Jason SewallNov 18, 2009
  28. Bert WesargNov 18, 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.