Thread (42 messages) flat view 42 messages, 3 authors, 2016-06-15

Re: [PATCHv2 3/3] Teach --dirstat to not completely ignore rearranged lines within a file

From: Johan Herland <hidden>
Date: 2016-06-15 22:51:01

Possibly related (same subject, not in this thread)

On Tuesday 12 April 2011, Junio C Hamano wrote:
Johan Herland [off-list ref] writes:
quoted
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, [off-list ref]
www.herland.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help