git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Robert Estelle via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Robert Estelle <robert.estelle@gmail.com>
Subject: [PATCH 0/2] color: support "default" to restore fg/bg color
Date: Mon, 25 Oct 2021 22:32:34 +0000	[thread overview]
Message-ID: <pull.1116.git.git.1635201156.gitgitgadget@gmail.com> (raw)

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

             reply	other threads:[~2021-10-25 22:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 22:32 Robert Estelle via GitGitGadget [this message]
2021-10-25 22:32 ` [PATCH 1/2] color: add missing GIT_COLOR_* white/black constants Robert Estelle via GitGitGadget
2021-10-25 22:32 ` [PATCH 2/2] color: support "default" to restore fg/bg color Robert Estelle via GitGitGadget
2021-10-25 22:39   ` brian m. carlson
2021-10-25 22:49     ` Junio C Hamano
2021-10-26  0:54       ` Robert Estelle
2021-10-28 16:41         ` Junio C Hamano
2021-10-28 17:33           ` Robert Estelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1116.git.git.1635201156.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=robert.estelle@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).