From: Jeff King Date: Thu, 04 Aug 2016 07:38:33 GMT Subject: Re: [PATCH 0/8] Better heuristics make prettier diffs Message-ID: <20160804073833.7s3hh26hkalifima@sigill.intra.peff.net> In-Reply-To: On Thu, Aug 04, 2016 at 12:00:28AM +0200, Michael Haggerty wrote: > I've talked about this quite a bit on the list already. The idea is to > improve ugly diffs like > > @@ -231,6 +231,9 @@ if (!defined $initial_reply_to && $prompting) { > } > > if (!$smtp_server) { > + $smtp_server = $repo->config('sendemail.smtpserver'); > +} > +if (!$smtp_server) { > foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) { > if (-x $_) { > $smtp_server = $_; Not that you probably need more random cases of C code, but I happened to be looking at a diff in git.git today, b333d0d6, which is another regression for the compaction heuristic. The indent heuristic here gets it right. Coincidentally, another example is the final patch in this series. So I am already happier even without digging further yet. :) -Peff