From: Thomas Rast <trast@inf.ethz.ch>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [PATCH] branch: colour upstream branches
Date: Sun, 14 Apr 2013 21:07:30 +0200 [thread overview]
Message-ID: <87li8lylql.fsf@hexa.v.cablecom.net> (raw)
In-Reply-To: <1365903985-24920-1-git-send-email-felipe.contreras@gmail.com> (Felipe Contreras's message of "Sat, 13 Apr 2013 20:46:25 -0500")
Felipe Contreras <felipe.contreras@gmail.com> writes:
> It's hard to see them among so much output otherwise.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
> builtin/branch.c | 27 ++++++++++++++++++++-------
> 1 file changed, 20 insertions(+), 7 deletions(-)
>
> diff --git a/builtin/branch.c b/builtin/branch.c
> index 00d17d2..a1cdc29 100644
> --- a/builtin/branch.c
> +++ b/builtin/branch.c
> @@ -417,32 +417,45 @@ static void fill_tracking_info(struct strbuf *stat, const char *branch_name,
> int ours, theirs;
> char *ref = NULL;
> struct branch *branch = branch_get(branch_name);
> + char fancy[80];
>
> if (!stat_tracking_info(branch, &ours, &theirs)) {
> if (branch && branch->merge && branch->merge[0]->dst &&
> - show_upstream_ref)
> - strbuf_addf(stat, "[%s] ",
> - shorten_unambiguous_ref(branch->merge[0]->dst, 0));
> + show_upstream_ref) {
> + ref = shorten_unambiguous_ref(branch->merge[0]->dst, 0);
> + if (want_color(branch_use_color))
> + strbuf_addf(stat, "[%s%s%s] ",
> + GIT_COLOR_BLUE, ref, GIT_COLOR_RESET);
AFAICS you are hardcoding the color? The other bits of branch colors
are configurable through branch.color.*, so why not this?
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2013-04-14 19:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 1:46 [PATCH] branch: colour upstream branches Felipe Contreras
2013-04-14 19:07 ` Thomas Rast [this message]
2013-04-14 22:31 ` Duy Nguyen
2013-04-14 23:22 ` Felipe Contreras
2013-04-14 23:46 ` Duy Nguyen
2013-04-14 23:54 ` Felipe Contreras
2013-04-15 0:55 ` Duy Nguyen
2013-04-15 1:24 ` Felipe Contreras
2013-04-15 1:31 ` Duy Nguyen
2013-04-15 1:35 ` Felipe Contreras
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=87li8lylql.fsf@hexa.v.cablecom.net \
--to=trast@inf.ethz.ch \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.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.