Re: [PATCHv2 12/20] submodule.c: convert show_submodule_summary to use emit_line_fmt
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 20, 2017, 04:50 UTC
- Message-ID
- <xmqqk25ct9lh.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAGZ79kbXyjTaE=F7YU8yu8=eNzLS96sA5r5N4xrhmOfw+T4Lwg@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
> That could be added in ws.c:ws_check_emit, as these certain words > are similar to coloring whitespace.
I actually was envisioning of highlighting a part of a line, like
-Very <red>poor</red> SCM
+Very <green>nice</red> SCMwhich would be done by finding semi-matching removed and added lines in the same hunk (i.e. local buffering) and makes a coloring decision. That does not have any place in ws.c.
Show 12 quoted lines
>> Having said that, we need to start somewhere, and I think it is a >> reasonable first-cut attempt to work on top of the textual output >> like this series does (IOW, while I do agree with the NEEDSWORK and >> the way this series currently does things must be revamped in the >> longer term, I do not think we should wait until that happens to >> start playing with this topic). > > Ok. I share a similar reaction to submodule diffs that we discuss above > and word coloring, that Jonathan Tan brought up off list. > > Both of them are broken in this implementation, but the NEEDSWORK > would hint at how to fix them.
Yes, but if NEEDSWORK has to say "the current hack is working at a wrong level, we need to do all of this before producing textual diffs that are passed to the layer that colors lines", that wouldn't help that much as a hint X-<.