Nguyễn Thái Ngọc Duy [off-list ref] 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?
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;