Re: [PATCH v3 10/13] pretty: add %C(auto) for auto-coloring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> 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;

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]