Re: [RFC/PATCH 02/11] ref-filter: add 'colornext' atom
On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak <karthik.188@gmail.com> wrote:
Show 9 quoted lines
> @@ -712,6 +713,15 @@ static void populate_value(struct ref_array_item *ref)
> v->modifier_atom = 1;
> v->pad_to_right = 1;
> continue;
> + } else if (starts_with(name, "colornext:")) {
> + char color[COLOR_MAXLEN] = "";
> +
> + if (color_parse(name + 10, color) < 0)
> + die(_("unable to parse format"));Maybe use skip_prefix(), and die() with a more helpful message.
Show 6 quoted lines
> + v->s = xstrdup(color);
> + v->modifier_atom = 1;
> + v->color_next = 1;
> + continue;
> } else
> continue;