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

Re: [PATCH] Colourise git-branch output

From
APAndy Parkins <andyparkins@gmail.com>
Date
Dec 12, 2006, 11:03 UTC
Message-ID
<200612121103.31110.andyparkins@gmail.com>
In-Reply-To
<7vpsapwhl2.fsf@assigned-by-dhcp.cox.net>
On Tuesday 2006 December 12 10:10, Junio C Hamano wrote:
> Even without red-green blindness issue, I think that makes
> sense.  colored-diff uses green/red for added/deleted but that

I certainly don't have any objection. For me, the use of colour is not to make things look pretty it's to give visual queues.

> is shown against the context in plain.  A sane thing to do for
> branch listing would be to show the usual case (i.e. local) in
> plain and show the remote ones differently.

The only reason I picked red and green was to indicate "can be checked out" and "cannot be checked out". However, when git eventually allows arbitrary commits to be checked out that green/red, can/can't distinction will be meaningless anyway.

> +	"",		/* LOCAL (normal) */
> +	"\033[32m",	/* CURRENT (green) */

In keeping with the "don't use green" idea - can I suggest just bold normal for the CURRENT? That way there is the most minimal use of colour for the default git-branch output, but still retaining a visual indicator.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 6 in “Colourise git-branch output”
  1. Colourise git-branch outputAndy Parkins, Dec 12, 2006
  2. Johannes SixtDec 12, 2006
  3. Junio C HamanoDec 12, 2006
  4. Andy ParkinsDec 12, 2006
  5. Junio C HamanoDec 12, 2006
  6. Junio C HamanoDec 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.