diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-04-21 12:09:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-24 10:38:47 +0900 |
commit | 295d949cfabc18fb588f269c77d1f8ff4a613686 (patch) | |
tree | 37438ad35b11bac18f386445f6571696fcf355ae /builtin | |
parent | Merge branch 'svn/authors-prog-2' of git://bogomips.org/git-svn (diff) | |
download | tgif-295d949cfabc18fb588f269c77d1f8ff4a613686.tar.xz |
color: introduce support for colorizing stderr
So far, we only ever asked whether stdout wants to be colorful. In the
upcoming patches, we will want to make push errors more prominent, which
are printed to stderr, though.
So let's refactor the want_color() function into a want_color_fd()
function (which expects to be called with fd == 1 or fd == 2 for stdout
and stderr, respectively), and then define the macro `want_color()` to
use the want_color_fd() function.
And then also add a macro `want_color_stderr()`, for convenience and
for documentation.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
0 files changed, 0 insertions, 0 deletions