Re: [RFC PATCH 00/19] Diff machine: highlight moved lines.
- From
Stefan Beller <sbeller@google.com>
- Date
- May 15, 2017, 16:33 UTC
- Message-ID
- <CAGZ79kaJeeXvcwj-Jc+KckLLzBvtOShp=bXjqHNQ83NBtzpaqA@mail.gmail.com>
- In-Reply-To
- <xmqq37c6uw7n.fsf@gitster.mtv.corp.google.com>
On Mon, May 15, 2017 at 5:43 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> Stefan Beller <sbeller@google.com> writes:
>
>> For details on *why* see the commit message of the last commit.
>
> Luckily, we have a good test case to see how effective this approach
> is in the flight. Running
>
> $ git diff master...'pu^{/Merge branch .js/blame-lib}'^2
>
> with your new feature should tell us that bulk of blame.[ch] that
> are new files came from builtin/blame.c with some symbols renamed.Oh! Yeah, that looks nice. Though looking through that[1] it seems not yet optimal to me.
So we have 2 additional colors for moved code to differentiate between adjacent moved blocks. However in this implementation we toggle between these two colors even if we're not adjacent, such that the moved_alternative color shows up quite frequently.
So if we have normal lines in between, we may want to reset to "default" moved color.
[1] http://i.imgur.com/djAoTf8.png
Thanks for pointing out this series, Stefan