[Q] should "color.*.<slot> = normal" emit nothing?
From: Junio C Hamano <hidden>
Date: 2016-06-15 23:03:51
If you wanted to paint the HEAD decoration as the same color as the
body text (primarily because cyan is too faint on a black-on-white
terminal to be readable) you would not want to say
[color "decorate"]
head = black
because that you would not be able to reuse same configuration on
a white-on-black terminal. I would naively expect
[color "decorate"]
head = normal
to work, but it does not. I notice that we have these definitions
in color.h:
#define GIT_COLOR_NORMAL ""
#define GIT_COLOR_RESET "\033[m"
#define GIT_COLOR_BOLD "\033[1m"
#define GIT_COLOR_RED "\033[31m"
#define GIT_COLOR_GREEN "\033[32m"
...
As a workaround, I ended up doing this:
[color "decorate"]
head = reset
which should work OK. But I have a feeling that the definition of
our "normal" may want to do the "reset", not "no-op" like we
currently do.
Comments?