Re: [PATCH v3 10/13] pretty: add %C(auto) for auto-coloring
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> case 'h': /* abbreviated commit hash */
> + strbuf_addstr(sb, diff_get_color(c->auto_color_next, DIFF_COMMIT));
> if (add_again(sb, &c->abbrev_commit_hash))
> return 1;
Doesn't this early return mess things up?
Show 5 quoted lines
> strbuf_addstr(sb, find_unique_abbrev(commit->object.sha1,
> c->pretty_ctx->abbrev));
> + strbuf_addstr(sb, diff_get_color(c->auto_color_next, DIFF_RESET));
> c->abbrev_commit_hash.len = sb->len - c->abbrev_commit_hash.off;
> return 1;