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

report default colors

From
JLJames Lowden <james.k.lowden@icloud.com>
Date
Dec 22, 2022, 17:47 UTC
Message-ID
<FC7C600C-5D51-4BE0-82BD-9E28C88A1BB8@icloud.com>
Hi, 
My good friends, I would like a way to report all colors, default and configured, used by git.  
I can report configured colors, 

$ git config --get-regexp color color.diff.meta black bold color.diff.frag magenta bold color.diff.old red bold color.diff.new blue bold

which is not terribly useful, because those values came from a file I control.  
I can get a list of all keys from "git help", which is something.  But I'm left guessing at which keys control the text on the screen for a given command, and what color they are.  
In the instant case, "git push" was rejected, and the reason is impossible to read because it's in yellow on a light blue background.  (Don't get me started on the pointlessly difficult antiquated arcane color control of ANSI terminals.)  My workaround is to guess what it probably says (probably it says I need to pull).  When that doesn't work, I copy and paste the text into emacs.  
What I would like to do is identify every color git is using for every purpose.  That would let me change, say, all yellow to yellow-on-black.  But I have no way to discover what shows up in yellow, other than intuition.  
Thank you for your kind consideration of my suggestion.  
--jkl
Next: Junio C Hamano
Message 1 of 2 in “report default colors”
  1. James LowdenDec 22, 2022
  2. Junio C HamanoDec 23, 2022

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.