On Fri, Jun 30, 2017 at 12:26 AM, Simon Ruderich <[email protected]> wrote:
> On Thu, Jun 29, 2017 at 05:07:10PM -0700, Stefan Beller wrote:
>> +     Small blocks of 3 moved lines or fewer are skipped.
>
> If I read the commit messages correctly, this "skipping" process
> applies to the move detection in general for those smaller blocks
> and therefore doesn't mean a malicious move can hide smaller
> changes, correct? If so, I find this sentence misleading. Maybe
> something like:
>
>     Small blocks of 3 moved lines or fewer are excluded from move
>     detection and colored as regular diff.

Well, this reads as if "blocks of 3 lines" are excluded, but what I
mean is "if all adjacent blocks combined are 3 lines or fewer"

Example of how I understand the code:

    context
  + moved line, block A
  + moved line, block A
  + moved line, block B
  + moved line, block A
  + moved line, block A
    context

These five lines are colored, because 5>3, but each
individual block is smaller than 3 lines. However we
already want to tell the reviewer that the middle line is not part of
a contiguous 5 line block, so we have to use alternative color
in the middle.

However

    context
  + moved line, block A or B
  + moved line, block A or B
    context

is omitted, because the number of lines
here is fewer than 3 ignoring the block
type.

Maybe

  If there are fewer than 3 adjacent lines of
  moved code, they are skipped.

Thanks,
Stefan

>
> Regards
> Simon
> --
> + privacy is necessary
> + using gnupg http://gnupg.org
> + public key id: 0x92FEFDB7E44C32F9

Reply via email to