From: Junio C Hamano <gitster@pobox.com>
To: Leah Neukirchen <leah@vuxu.org>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH] color: respect the $NO_COLOR convention
Date: Thu, 01 Mar 2018 11:06:45 -0800 [thread overview]
Message-ID: <xmqq8tbbhayi.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <87efl3emlm.fsf@vuxu.org> (Leah Neukirchen's message of "Thu, 01 Mar 2018 18:23:33 +0100")
Leah Neukirchen <leah@vuxu.org> writes:
> You are right in calling this out an emerging new thing, but the
> second list of that page proves that it will be useful to settle on a
> common configuration, and my hope is by getting a few popular projects
> on board, others will soon follow. It certainly is easy to implement,
> and rather unintrusive. Users which don't know about this feature are
> completely unaffected.
There certainly is chicken-and-egg problem there. Even though I
personally prefer not to see overuse of colors, I am not sure if
we the Git community as a whole would want to be involved until it
gets mainstream.
>>> if (color_stdout_is_tty < 0)
>>> color_stdout_is_tty = isatty(1);
>>> if (color_stdout_is_tty || (pager_in_use() && pager_use_color)) {
>>
>> According to no-color.org's FAQ #2, NO_COLOR should affect only the
>> "default" behaviour, and should stay back if there is an explicit
>> end-user configuration (or command line override). And this helper
>> function is called only from want_color() when their is no such
>> higher precedence setting, which is in line with the recommendation.
>>
>> Which is good.
>
> Yes, I took care of that. Should this also be tested? It doesn't
> quite fit into the setting of t4026-color.sh I think.
It probably fits much better in t7006, I would suspect. Earlier,
setting color.ui to auto meant the output is colored when run under
test_terminal, but with this new environment set, the output will
have to be bland.
next prev parent reply other threads:[~2018-03-01 19:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 16:44 [RFC PATCH] color: respect the $NO_COLOR convention Leah Neukirchen
2018-03-01 17:10 ` Junio C Hamano
2018-03-01 17:23 ` Leah Neukirchen
2018-03-01 19:06 ` Junio C Hamano [this message]
2018-03-04 22:39 ` brian m. carlson
2018-03-05 2:24 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq8tbbhayi.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=leah@vuxu.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).