From: Jonathan Tan Date: Tue, 24 Apr 2018 22:59:48 GMT Subject: Re: [PATCH 5/7] diff.c: add a blocks mode for moved code detection Message-ID: <20180424155948.e37a0d12fdf0e2fdafde153d@google.com> In-Reply-To: On Tue, 24 Apr 2018 15:37:51 -0700 Stefan Beller wrote: > These can be combined independently, so would > you expect the user to expect two options for them? > For example "--color-moved=zebra" could be split > into "--skip-small --alternate-blocks" Yes, this is a good explanation. Reusing your terms below, --skip-small controls the algorithm, and --alternate-blocks controls the presentation layer. > So instead of building blocks we rather want to split into algorithms > and presentation layer? > > The presentation layer would be things like: > * use a different color for moved things > * alternate colors for adjacent blocks > * paint border of a block (dimmed zebra) > > The algorithm side would be > * detect moves > * detect moves as blocks > * skip small heuristic Yes. This was just brainstorming, though - this might not be the direction we want to take in this patch. (The right solution might just be to always use blocks - thereby simplifying the algorithm aspect.)