From: Johan Herland Date: Tue, 12 Apr 2011 09:22:56 GMT Subject: Re: [PATCHv2 3/3] Teach --dirstat to not completely ignore rearranged lines within a file Message-ID: <201104121122.56870.johan@herland.net> In-Reply-To: <7vwrj0sap3.fsf@alter.siamese.dyndns.org> On Tuesday 12 April 2011, Junio C Hamano wrote: > Johan Herland writes: > > I still feel that a file with 1000 rearranged lines should somehow > > count "more" than a file with only 1 rearranged line,... > > I think that is just entirely a different mode of operation. I do not > think it is wrong to have an alternative implementation of the dirstat > damage counter that is based on numstat code. > > It may end up counting the damage slower than the current code, and more > importantly it will count a different kind of damage than the current > code does, so we may probably want to make it an optional feature. I wrote it up just for fun, and here's the patch. I'll leave it up to you to decide if it's worth it. First, though, I've got another patch to --dirstat, which - in the case of renames, attributes the damage to the target filename instead of the source filename. I found this more intuitive, especially in the case of copies (-C -C) where damage would be attributed to the directory containing the (unchanged) source file, instead of the directory containing the (changed) target file. Have fun! :) ...Johan -- Johan Herland, www.herland.net