git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Q] should "color.*.<slot> = normal" emit nothing?
@ 2015-02-18 21:03 Junio C Hamano
  2015-02-18 21:44 ` [PATCH] log --decorate: do not leak "commit" color into the next item Junio C Hamano
  0 siblings, 1 reply; 16+ messages in thread
From: Junio C Hamano @ 2015-02-18 21:03 UTC (permalink / raw)
  To: git

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?

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-03-04 21:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 21:03 [Q] should "color.*.<slot> = normal" emit nothing? Junio C Hamano
2015-02-18 21:44 ` [PATCH] log --decorate: do not leak "commit" color into the next item Junio C Hamano
2015-02-18 23:07   ` Jeff King
2015-02-19 18:02     ` Junio C Hamano
2015-02-20  1:42       ` Jeff King
2015-02-20 23:06         ` Junio C Hamano
2015-02-21  6:23           ` Jeff King
2015-02-21  7:09             ` Junio C Hamano
2015-03-04 21:33   ` [PATCH v2 0/7] Fix leak of color/attributes in "git log --decorate" Junio C Hamano
2015-03-04 21:33     ` [PATCH v2 1/7] Documentation/config.txt: avoid unnecessary negation Junio C Hamano
2015-03-04 21:33     ` [PATCH v2 2/7] Documentation/config.txt: explain multi-valued variables once Junio C Hamano
2015-03-04 21:33     ` [PATCH v2 3/7] Documentation/config.txt: describe the structure first and then meaning Junio C Hamano
2015-03-04 21:33     ` [PATCH v2 4/7] Documentation/config.txt: have a separate "Values" section Junio C Hamano
2015-03-04 21:33     ` [PATCH v2 5/7] Documentation/config.txt: describe 'color' value type in the " Junio C Hamano
2015-03-04 21:33     ` [PATCH v2 6/7] Documentation/config.txt: simplify boolean description in the syntax section Junio C Hamano
2015-03-04 21:33     ` [PATCH v2 7/7] log --decorate: do not leak "commit" color into the next item Junio C Hamano

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).