From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/1] Colorize some errors on stderr
Date: Fri, 16 Feb 2018 11:21:21 -0800 [thread overview]
Message-ID: <xmqqwozc68r2.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <cover.1518783709.git.johannes.schindelin@gmx.de> (Johannes Schindelin's message of "Fri, 16 Feb 2018 13:25:44 +0100 (STD)")
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> Now, what would be possible solutions for this?
>
> - introduce `int fd` in `want_color()` (and callees) so that we can make
> a distinction whether we want to detect whether stdout or stderr is connected
> to a tty
>
> - introduce a separate `want_color_stderr()` (we still would need to decide
> whether we want a config setting for this)
Between the above two, there probably aren't so big a difference, but
in order to avoid disrupting existing callers of want_color() while
possibly sharing as much code between the old and new callers,
perhaps:
extern int want_color_fd(int fd, int colorbool);
#define want_color(colorbool) want_color_fd(1, (colorbool))
#define want_color_stderr(colorbool) want_color_fd(2, (colorbool))
We should honor configuration at two levels, just like the colors on
stdout, i.e. color in which individual items are painted (e.g.
color.diff.filename, color.advice.hint) and whether we use colors in
UI at all (e.g. color.ui). I do not think it is necessary or even
at the right granularity to allow settings like "do color stdout but
do not color errors".
> - not color stderr, ever
This is my personal preference, but that does not and should not
carry too much weight ;-)
next prev parent reply other threads:[~2018-02-16 19:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 12:25 [PATCH 0/1] Colorize some errors on stderr Johannes Schindelin
2018-02-16 12:25 ` [PATCH 1/1] Colorize push errors Johannes Schindelin
2018-02-16 19:21 ` Junio C Hamano [this message]
2018-04-06 11:21 ` [PATCH 0/1] Colorize some errors on stderr Johannes Schindelin
2018-04-05 22:48 ` [PATCH v2 0/4] Colorize push errors Johannes Schindelin
2018-04-05 22:48 ` [PATCH v2 1/4] color: introduce support for colorizing stderr Johannes Schindelin
2018-04-05 22:48 ` [PATCH v2 2/4] push: colorize errors Johannes Schindelin
2018-04-05 23:37 ` Jacob Keller
2018-04-06 11:15 ` Johannes Schindelin
2018-04-05 22:48 ` [PATCH v2 3/4] Add a test to verify that push errors are colorful Johannes Schindelin
2018-04-06 10:50 ` Eric Sunshine
2018-04-06 12:13 ` Johannes Schindelin
2018-04-05 22:48 ` [PATCH v2 4/4] Document the new color.* settings to colorize push errors/hints Johannes Schindelin
2018-04-06 10:56 ` Eric Sunshine
2018-04-06 12:15 ` Johannes Schindelin
2018-04-07 6:55 ` Eric Sunshine
2018-04-21 10:09 ` [PATCH v3 0/4] Colorize push errors Johannes Schindelin
2018-04-21 10:09 ` [PATCH v3 1/4] color: introduce support for colorizing stderr Johannes Schindelin
2018-04-21 10:10 ` [PATCH v3 2/4] push: colorize errors Johannes Schindelin
2018-04-21 10:10 ` [PATCH v3 3/4] Add a test to verify that push errors are colorful Johannes Schindelin
2018-04-21 10:10 ` [PATCH v3 4/4] Document the new color.* settings to colorize push errors/hints Johannes Schindelin
2018-04-06 18:48 ` [PATCH 0/1] Colorize some errors on stderr Ævar Arnfjörð Bjarmason
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=xmqqwozc68r2.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
/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).