]> git.ipfire.org Git - thirdparty/git.git/commit - t/t4026-color.sh
color: support "default" to restore fg/bg color
authorRobert Estelle <robertestelle@gmail.com>
Mon, 25 Oct 2021 22:32:36 +0000 (22:32 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Oct 2021 16:37:08 +0000 (09:37 -0700)
commit05f1f41c9b02b916a5f03c5658bec3270ac3684d
tree1f56c22fefc92aca90f426a61c7505a144a05976
parentaeefc1866c7f98ac76aac66b92cc142b8135054e
color: support "default" to restore fg/bg color

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 other 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).

Signed-off-by: Robert Estelle <robertestelle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt
color.c
color.h
t/t4026-color.sh