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

[PATCH 0/2] color: support "default" to restore fg/bg color

From
Robert Estelle via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 25, 2021, 22:32 UTC
Message-ID
<pull.1116.git.git.1635201156.gitgitgadget@gmail.com>

The name "default" can now be used in foreground or background colors, and means to use the terminal's default color, discarding any explicitly-set color without affecting the other attributes. On many modern terminals, this is not the same as specifying "white" or "black".

Although attributes could previously be cleared like "no-bold", there had not been a similar mechanism available for colors, other than a full "reset", which cannot currently be combined with post-reset settings.

Note that this is not the same as the existing name "normal", which is a no-op placeholder to permit setting the background without changing the foreground. (i.e. what is currently called "normal" might have been more descriptively named "inherit", "none", "pass" or similar).

Robert Estelle (2):
  color: add missing GIT_COLOR_* white/black constants
  color: support "default" to restore fg/bg color
 Documentation/config.txt | 18 +++++++++++++-----
 color.c                  | 23 ++++++++++++++++++++++-
 color.h                  | 12 ++++++++++++
 t/t4026-color.sh         | 12 ++++++++++++
 4 files changed, 59 insertions(+), 6 deletions(-)
base-commit: 225bc32a989d7a22fa6addafd4ce7dcd04675dbf
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1116%2Frwe%2Fansi-default-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1116/rwe/ansi-default-v1
Pull-Request: https://github.com/git/git/pull/1116
-- 
gitgitgadget
Next: Robert Estelle via GitGitGadget
Message 1 of 8 in “color: support "default" to restore fg/bg color”
  1. 0/2 color: support "default" to restore fg/bg colorRobert Estelle via GitGitGadget, Oct 25, 2021
  2. 1/2 color: add missing GIT_COLOR_* white/black constantsRobert Estelle via GitGitGadget, Oct 25, 2021
  3. 2/2 color: support "default" to restore fg/bg colorRobert Estelle via GitGitGadget, Oct 25, 2021
  4. brian m. carlsonOct 25, 2021
  5. Junio C HamanoOct 25, 2021
  6. Robert EstelleOct 26, 2021
  7. Junio C HamanoOct 28, 2021
  8. Robert EstelleOct 28, 2021

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.