On Mon, Mar 17, 2014 at 04:07:00PM -0700, Junio C Hamano wrote:
> >> > - if (!memcmp(used_atom[at], "color:", 6))
> >> > + if (starts_with(used_atom[at], "color:"))
> >> > need_color_reset_at_eol =
> >> > !!strcmp(used_atom[at], color_reset);
> What if used_atom[at] is not related to color at all? We do not
> want to touch the variable.
Thanks, that is what I was missing. It is not "did we find a reset" but
"toggle on for a non-reset color, toggle off for a reset".
It could be written with skip_prefix as:
if (skip_prefix(used_atom[at], "color:", &c))
need_color_reset_at_eol = !!strcmp(c, "reset");
but I do not think it is particularly important to do so. Sorry for the
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html