From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] log --decorate: do not leak "commit" color into the next item
Date: Thu, 19 Feb 2015 20:42:31 -0500 [thread overview]
Message-ID: <20150220014230.GA16124@peff.net> (raw)
In-Reply-To: <xmqqvbixzsnv.fsf@gitster.dls.corp.google.com>
On Thu, Feb 19, 2015 at 10:02:12AM -0800, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > Yeah, I think this is a good fix. I had a vague feeling that we may have
> > done this on purpose to let the decoration color "inherit" from the
> > existing colors for backwards compatibility, but I don't think that
> > could ever have worked (since color.decorate.* never defaulted to
> > "normal").
>
> Hmph, but that $gmane/191118 talks about giving bold to commit-color
> and then expecting for decors to inherit the boldness, a wish I can
> understand. But I do not necessarily agree with it---it relies on
> that after "<commit-color>(" and "<commit-color>, " there is no reset,
> which is not how everything else works.
I don't see anybody actually _wanting_ the inheritance. It is mentioned
merely as an observation. So yeah, we would break anybody who does:
[color "diff"]
commit = blue
[color "decorate"]
branch = normal
remoteBranch = normal
tag = normal
stash = normal
HEAD = normal
and expects the "blue" to persist automatically.
But given that this behaves in the opposite way of every other part of
git's color handling, I think we can call it a bug, and people doing
that are crazy (they should s/normal/blue/ in the latter config).
> So this change at least needs to come with an explanation to people
> who are used to and took advantage of this color attribute leakage,
> definitely in the log message and preferrably to the documentation
> that covers all the color.*.<slot> settings, I think.
I'd agree it is worth a mention in the log (and possibly release notes),
but I don't think it is worth polluting the documentation forever
(though explaining that we never inherit might be worth doing, and that
is perhaps what you meant).
-Peff
next prev parent reply other threads:[~2015-02-20 3:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150220014230.GA16124@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.