Re: [PATCH v4 15/16] branch: use ref-filter printing APIs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 12, 2016, 20:40 UTC
- Message-ID
- <xmqqtwj6pnma.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1460227515-28437-16-git-send-email-Karthik.188@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 7 quoted lines
> + branch_get_color(BRANCH_COLOR_REMOTE), maxwidth,
> + remote_prefix, branch_get_color(BRANCH_COLOR_RESET));
> + } else {
> + strbuf_addf(&local, "%%(refname:strip=2)%s%%(if)%%(symref)%%(then) -> %%(symref:short)%%(end)",
> + branch_get_color(BRANCH_COLOR_RESET));
> + strbuf_addf(&remote, "%s%s%%(refname:strip=2)%s%%(if)%%(symref)%%(then) -> %%(symref:short)%%(end)",
> + branch_get_color(BRANCH_COLOR_REMOTE), remote_prefix, branch_get_color(BRANCH_COLOR_RESET));The overlong lines are somewhat irritating, but the change above in this round relative to the previous one shows a good use case for the conditional formatting feature and illustrates how powerful the concept it is. I like it.
Thanks, will queue.