Re: [RFC/PATCH 5/3] Alternative --dirstat implementation, based on diffstat analysis
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Apr 12, 2011, 15:08 UTC
- Message-ID
- <BANLkTi=yYU+v1Xx_YO6kpC8+1ukOdwb6SQ@mail.gmail.com>
- In-Reply-To
- <BANLkTim9U4cOnV+5=Mp-2g_M6+JOiM5e7A@mail.gmail.com>
On Tue, Apr 12, 2011 at 7:46 AM, Linus Torvalds <torvalds@linux-foundation.org> 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