Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC/PATCH 5/3] Alternative --dirstat implementation, based on diffstat analysis

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:02

Johan Herland [off-list ref] writes:
So, how should we count binary files in the diffstat version of
--dirstat?
IIRC, the reason Linus used the "change" (not "lines") damage computation
in dirstat was exactly for this reason.

Comparing and combining the damage as number of lines and changed bytes
simply does not make much sense, so my gut answer to this question is "we
shouldn't".  The --numstat mode punts exactly for this reason, to avoid
tempting people to add numbers up without thinking and getting nonsense
results.

I suspect that any heuristics is as good as your divide-by-64; you
probably could run count_lines(one->data, one->size) in the text diff
codepath in builtin_diffstat() to keep a running average of the line
lengths of the files involved, but I do not think it is worth it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help