[Q] should "color.*.<slot> = normal" emit nothing?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 18, 2015, 21:03 UTC
- Message-ID
- <xmqqzj8b0w6t.fsf@gitster.dls.corp.google.com>
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 = blackbecause that you would not be able to reuse same configuration on a white-on-black terminal. I would naively expect
[color "decorate"]
head = normalto 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 = resetwhich 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?