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

Re: [PATCH 2/4] git branch: Use color configuration infrastructure

From
Jeff King <peff@peff.net>
Date
Jan 8, 2008, 11:23 UTC
Message-ID
<20080108112328.GA19941@coredump.intra.peff.net>
In-Reply-To
<1199542299-12082-2-git-send-email-mk@spinlock.ch>
On Sat, Jan 05, 2008 at 03:11:37PM +0100, Matthias Kestenholz wrote:
Show 10 quoted lines
> --- a/builtin-branch.c
> +++ b/builtin-branch.c
> [...]
> -static int branch_use_color;
> [...]
>  	if (!strcmp(var, "color.branch")) {
> -		branch_use_color = git_config_colorbool(var, value, -1);
> +		git_use_color = git_config_colorbool(var, value, -1);
>  		return 0;
>  	}

If I read this right, you are getting rid of the individual "use color" variables with a single static git_use_color. This will break if two different color "zones" get used in the same program (e.g., color.branch and color.diff, but only one is supposed to be set). I don't think this is a problem currently, but it seems like a step backwards in terms of libification.

-Peff
Previous: Matthias KestenholzNext: Matthias Kestenholz
Message 15 of 17 in “add--interactive: allow diff colors without interactive colors”
  1. add--interactive: allow diff colors without interactive colorsJeff King, Jan 4, 2008
  2. Junio C HamanoJan 5, 2008
  3. Jeff KingJan 5, 2008
  4. Junio C HamanoJan 5, 2008
  5. Jeff KingJan 5, 2008
  6. Junio C HamanoJan 5, 2008
  7. Jeff KingJan 5, 2008
  8. Matthias KestenholzJan 5, 2008
  9. Junio C HamanoJan 5, 2008
  10. Matthias KestenholzJan 5, 2008
  11. 1/4 Add infrastructure for a single color config variableMatthias Kestenholz, Jan 5, 2008
  12. 2/4 git branch: Use color configuration infrastructureMatthias Kestenholz, Jan 5, 2008
  13. 3/4 status and commit: Use color configuration infrastructureMatthias Kestenholz, Jan 5, 2008
  14. 4/4 diff and log: Use color configuration infrastructureMatthias Kestenholz, Jan 5, 2008
  15. Jeff KingJan 8, 2008
  16. Matthias KestenholzJan 8, 2008
  17. Jakub NarebskiJan 5, 2008

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.