[PATCH 0/1] Colorize some errors on stderr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is an RFC because it tries to introduce a fundamental new color feature:
Coloring messages *on stderr*.

So far, pretty much everything in color.[ch] assumed that you want to color
only stuff on stdout.

However, in this case, a user (who became a contributor!) wanted some messages
that are printed to stderr and were missed by his colleagues to be colored.

The contribution comes via Pull Request from the Git for Windows project:

	https://github.com/git-for-windows/git/pull/1429

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)

- not color stderr, ever

Also, I did not have too much time to dig into the question how to test this in
Git's test suite. Do we already have tests that generate fake server-side errors
onto which I could piggy-back a new test case?

Thoughts? Suggestions? Help?


Ryan Dammrose (1):
  Colorize push errors

 advice.c       | 42 +++++++++++++++++++++++++++++++++++++++--
 builtin/push.c | 38 +++++++++++++++++++++++++++++++++++++
 transport.c    | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 136 insertions(+), 3 deletions(-)


base-commit: b2e45c695d09f6a31ce09347ae0a5d2cdfe9dd4e
Published-As: https://github.com/dscho/git/releases/tag/colorize-push-errors-v1
Fetch-It-Via: git fetch https://github.com/dscho/git colorize-push-errors-v1
-- 
2.16.1.windows.4




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux