All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Arjen Laarhoven <arjen@yaph.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] Clean up use of ANSI color sequences
Date: Fri, 13 Feb 2009 18:02:51 -0800	[thread overview]
Message-ID: <7v4oyx4vxw.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 1234562021-2397-1-git-send-email-arjen@yaph.org

Arjen Laarhoven <arjen@yaph.org> writes:

> diff --git a/pretty.c b/pretty.c
> index cc460b5..a8595f6 100644
> --- a/pretty.c
> +++ b/pretty.c
> @@ -567,16 +567,16 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,
>  			return end - placeholder + 1;
>  		}
>  		if (!prefixcmp(placeholder + 1, "red")) {
> -			strbuf_addstr(sb, "\033[31m");
> +			strbuf_addstr(sb, COLOR_RED);
>  			return 4;
>  		} else if (!prefixcmp(placeholder + 1, "green")) {
> -			strbuf_addstr(sb, "\033[32m");
> +			strbuf_addstr(sb, COLOR_GREEN);
>  			return 6;
>  		} else if (!prefixcmp(placeholder + 1, "blue")) {
> -			strbuf_addstr(sb, "\033[34m");
> +			strbuf_addstr(sb, COLOR_BLUE);
>  			return 5;
>  		} else if (!prefixcmp(placeholder + 1, "reset")) {
> -			strbuf_addstr(sb, "\033[m");
> +			strbuf_addstr(sb, COLOR_RESET);

These four are obviously bad and not even compile tested.

I'll fix them up when queuing.

  parent reply	other threads:[~2009-02-14  2:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12 20:37 [PATCH] Clean up use of ANSI color sequences Arjen Laarhoven
2009-02-12 23:03 ` Junio C Hamano
2009-02-13 21:53   ` [PATCH 1/2] " Arjen Laarhoven
2009-02-13 21:53     ` [PATCH 2/2] builtin-branch.c: Rename branch category color names Arjen Laarhoven
2009-02-14  2:02     ` Junio C Hamano [this message]
2009-02-14  7:41       ` [PATCH 1/2] Clean up use of ANSI color sequences Arjen Laarhoven
2009-02-14  7:53         ` 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=7v4oyx4vxw.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=arjen@yaph.org \
    --cc=git@vger.kernel.org \
    /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.