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

Re: What's cooking in git.git (Dec 2010, #01; Sat, 4)

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 10, 2010, 19:55 UTC
Message-ID
<7vk4jhcshf.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20101209172708.GA1817@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 30 quoted lines
> Subject: [PATCH] default color.status.branch to "same as header"
>
> This gives it the same behavior as we had prior to 1d28232
> (status: show branchname with a configurable color).
>
> To do this we need the concept of a "NIL" color, which is
> provided by color.[ch]. The implementation is very simple;
> in particular, there are no precautions taken against code
> accidentally printing the NIL. This should be fine in
> practice because:
>
>   1. You can't input a NIL color in the config, so it must
>      come from the in-code defaults. Which means it is up
>      the client code to handle the NILs it defines.
>
>   2. If we do ever print a NIL, it will be obvious what the
>      problem is, and the bug can be fixed.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> I resisted the urge to make a generic "same as $X" token, which would
> allow users to do something like:
>
>   [color "status"]
>     branch = from:color.status.header
>
> if they really wanted. But that would be a lot more code, and I'm not
> sure it would be all that useful (it would be if people did stuff like
> theming git colors like they do window managers, but I don't think we
> are at quite that level).

Also if you go that route you would need to worry about dependencies, which would not be worth it.

> This is simple, solves the current regression, and provides an easy
> blueprint for handling the case in the future.

As I said, I don't care deeply, but you obviously cared enough to produce a patch that is pretty simple and straightforward. Let's take it.

Thanks.
Previous: Jeff KingNext: Yann Dirson
Message 6 of 27 in “What's cooking in git.git (Dec 2010, #01; Sat, 4)”
  1. Junio C HamanoDec 5, 2010
  2. Jeff KingDec 5, 2010
  3. Junio C HamanoDec 5, 2010
  4. aleksi.aalto@iki.fiDec 6, 2010
  5. Jeff KingDec 9, 2010
  6. Junio C HamanoDec 10, 2010
  7. Yann DirsonDec 5, 2010
  8. Junio C HamanoDec 5, 2010
  9. Yann DirsonDec 6, 2010
  10. Miles BaderDec 6, 2010
  11. Yann DirsonDec 6, 2010
  12. Miles BaderDec 6, 2010
  13. Yann DirsonDec 6, 2010
  14. Miles BaderDec 6, 2010
  15. Yann DirsonDec 6, 2010
  16. Matthieu MoyDec 6, 2010
  17. Junio C HamanoDec 10, 2010
  18. aleksi.aalto@iki.fiDec 5, 2010
  19. Patrick RouleauDec 5, 2010
  20. Erik Faye-LundDec 5, 2010
  21. Junio C HamanoDec 5, 2010
  22. Michael J GruberDec 5, 2010
  23. Junio C HamanoDec 5, 2010
  24. Michael J GruberDec 6, 2010
  25. Thiago FarinaDec 6, 2010
  26. t9010 broken in pu [Re: What's cooking in git.git (Dec 2010, #01; Sat, 4)]Thomas Rast, Dec 8, 2010
  27. Jonathan NiederDec 8, 2010

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.