Re: [RFC PATCH 3/3] diff: check MIN_BLOCK_LENGTH at start of new block
- From
Stefan Beller <sbeller@google.com>
- Date
- Aug 14, 2017, 17:22 UTC
- Message-ID
- <CAGZ79kYd1rw8kCXyP8kSc0R2gxuRUDWrwfzPcGEBvMHXQe72Rw@mail.gmail.com>
- In-Reply-To
- <16707a12715ea60e05b00f4eb887ee99cd4d7b71.1502491372.git.jonathantanmy@google.com>
On Fri, Aug 11, 2017 at 3:49 PM, Jonathan Tan <jonathantanmy@google.com> wrote:
> When noticing that the current line is not the continuation of the > current block, but the start of a new one, mark_color_as_moved() does > not check the length of the current block. Perform that check.
As far as I remember that behavior is intentional, as indicated by the succeeding test.
The whole MIN_BLOCK_LENGTH thing is a hack IMHO as we did not have a better heuristic for suppressing uninteresting "moved" lines such as closing braces in C.
The information that a thing is moved in between two blocks is more valuable than pointing out it is just 'new' or 'old'.
As this is changing behavior in a way that seems controversial, can you give your motivation/example for why this behavior is better? (Do we want to put it into an option/mode?)