Re: [RFC PATCH 0/7] Moved code detection: ignore space on uniform indentation
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Apr 3, 2018, 19:55 UTC
- Message-ID
- <CA+P7+xpiTL4jpjFjxu-wStiGado60P2jkBs0XrhkRXfzVp6UqQ@mail.gmail.com>
- In-Reply-To
- <CAGZ79kZ-k7Ho-_Cg3OLLypfjoEn8pTDN7dWpX0=8o+o2BvUcqA@mail.gmail.com>
On Tue, Apr 3, 2018 at 12:00 PM, Stefan Beller <sbeller@google.com> wrote:
Show 13 quoted lines
>>>> The fun is in the last patch, which allows white space sensitive
>>>> languages to trust the move detection, too. Each block that is marked as
>>>> moved will have the same delta in {in-, de-}dentation.
>>>> I would think this mode might be a reasonable default eventually.
>>>
>>> This sounds like a good idea. "Trust" is probably too strong a word, but
>>> I can see this being useful even in non-whitespace-sensitive languages
>>> with nested blocks (like C).
>>
>> The ability to detect moved code despite whitespace changes would be
>> good, even while showing diffs with the whitespace intact.
>
> That is what the last patch is about.Right. I was trying to say "I agree with the goal, even if we don't necessarily allow every possible white-space + color-moved lines combination" (i.e. to avoid polluting the option space too much)
Thanks, Jake