From: Junio C Hamano Date: Sat, 13 Aug 2016 15:59:25 GMT Subject: Re: [PATCH 8/8] diff: improve positioning of add/delete blocks in diffs Message-ID: In-Reply-To: <20160813085904.lykoihh4v2lf4yuj@sigill.intra.peff.net> Jeff King writes: > So assuming everything I just said isn't complete bollocks, I think we > can move to a future where nobody uses the compaction heuristic. And > there are three ways to deal with that: > > 1. The knob and feature stay. It might be useful for somebody who > wants to experiment in the future. > > 2. The knob and feature go away completely. It was an experiment, but > now we have something more useful. > > 3. The feature goes away, but the knob stays as noop, or maybe as an > alias for the indent heuristic, just because we did ship a version > that accepts "--compaction-heuristic", and maybe somebody somewhere > put it in a script? > > I think I'd be in favor of (2). I am all for (2) [*1*] This and the previous "take a blank line as a hint" are both heuristics. As long as the resulting code does not tax runtime performance visibly and improves the resulting output 99% of the time, there is no reason to leave end-users a knob. "Among 9 hunks in this patch that touch hello.c, 7 are made much more readable but 2 are worse" cannot even be helped with a command line option. [Footnote] *1* I am also strongly against (3), if only to teach people a lesson ;-).