From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, Aleksi Aalto <aga@iki.fi>,
git@vger.kernel.org
Subject: Re: What's cooking in git.git (Dec 2010, #01; Sat, 4)
Date: Fri, 10 Dec 2010 11:55:56 -0800 [thread overview]
Message-ID: <7vk4jhcshf.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20101209172708.GA1817@sigill.intra.peff.net> (Jeff King's message of "Thu\, 9 Dec 2010 12\:27\:08 -0500")
Jeff King <peff@peff.net> writes:
> Subject: [PATCH] default color.status.branch to "same as header"
>
> This gives it the same behavior as we had prior to 1d28232
> (status: show branchname with a configurable color).
>
> To do this we need the concept of a "NIL" color, which is
> provided by color.[ch]. The implementation is very simple;
> in particular, there are no precautions taken against code
> accidentally printing the NIL. This should be fine in
> practice because:
>
> 1. You can't input a NIL color in the config, so it must
> come from the in-code defaults. Which means it is up
> the client code to handle the NILs it defines.
>
> 2. If we do ever print a NIL, it will be obvious what the
> problem is, and the bug can be fixed.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> I resisted the urge to make a generic "same as $X" token, which would
> allow users to do something like:
>
> [color "status"]
> branch = from:color.status.header
>
> if they really wanted. But that would be a lot more code, and I'm not
> sure it would be all that useful (it would be if people did stuff like
> theming git colors like they do window managers, but I don't think we
> are at quite that level).
Also if you go that route you would need to worry about dependencies,
which would not be worth it.
> This is simple, solves the current regression, and provides an easy
> blueprint for handling the case in the future.
As I said, I don't care deeply, but you obviously cared enough to produce
a patch that is pretty simple and straightforward. Let's take it.
Thanks.
next prev parent reply other threads:[~2010-12-10 19:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-05 6:30 What's cooking in git.git (Dec 2010, #01; Sat, 4) Junio C Hamano
2010-12-05 7:39 ` Jeff King
2010-12-05 19:54 ` Junio C Hamano
2010-12-06 0:54 ` aleksi.aalto
2010-12-09 17:27 ` Jeff King
2010-12-10 19:55 ` Junio C Hamano [this message]
2010-12-05 10:13 ` Yann Dirson
2010-12-05 20:23 ` Junio C Hamano
2010-12-06 7:29 ` Yann Dirson
2010-12-06 8:13 ` Miles Bader
2010-12-06 8:21 ` Yann Dirson
2010-12-06 8:39 ` Miles Bader
2010-12-06 8:48 ` Yann Dirson
2010-12-06 9:13 ` Miles Bader
2010-12-06 11:31 ` Yann Dirson
2010-12-06 11:37 ` Matthieu Moy
2010-12-10 21:59 ` Junio C Hamano
2010-12-05 12:36 ` aleksi.aalto
2010-12-05 15:51 ` Patrick Rouleau
2010-12-05 13:00 ` Erik Faye-Lund
2010-12-05 20:15 ` Junio C Hamano
2010-12-05 15:00 ` Michael J Gruber
2010-12-05 20:06 ` Junio C Hamano
2010-12-06 8:55 ` Michael J Gruber
2010-12-06 15:39 ` Thiago Farina
2010-12-08 11:23 ` t9010 broken in pu [Re: What's cooking in git.git (Dec 2010, #01; Sat, 4)] Thomas Rast
2010-12-08 11:28 ` Jonathan Nieder
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vk4jhcshf.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=aga@iki.fi \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).