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

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

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:51:01

Possibly related (same subject, not in this thread)

On Tue, Apr 12, 2011 at 7:46 AM, Linus Torvalds
[off-list ref] wrote:
So I don't hate the idea, but I do hate the "use a config option"
part. Or rather, I hate the fact that it's the _only_ way to do it
(and the particular config name you chose).
Oh, and one thing strikes me: I think the fast dirstat gave reasonable
values when you had mixed text and binary (in the kernel tree, look
for the Documentation/logo.gif file, for example: it changed to the
Tasmanian devil in one release).

Have you checked what happens to that when you use the diffstat one?
Because binary files are done very differently (byte-based counts).

So check out

   git show --dirstat 3d4f16348b77efbf81b7fa186a18a0eb815b6b84

with and without your change. The old dirstat gives

  44.0% Documentation/
  55.9% drivers/video/logo/

which is at least not completely insane.

The reason I bring this up is because I think this was an issue at one
point, and one of the statistics things (--stat or --numstat or
--dirstat) gave absolutely horrid values (basically comparing "bytes
changed" for binaries with "lines changed" for text files). Resulting
in totally skewed statistics.

                       Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help