From: Junio C Hamano Date: Fri, 08 Apr 2011 19:50:32 GMT Subject: Re: [PATCH 1/3] --dirstat: Document shortcomings compared to --stat or regular diff Message-ID: <7v1v1c4j5j.fsf@alter.siamese.dyndns.org> In-Reply-To: <201104081648.11842.johan@herland.net> Johan Herland writes: > diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt > index c93124b..25e48c4 100644 > --- a/Documentation/diff-options.txt > +++ b/Documentation/diff-options.txt > @@ -72,6 +72,11 @@ endif::git-format-patch[] > a cut-off percent (3% by default) are not shown. The cut-off percent > can be set with `--dirstat=`. Changes in a child directory are not > counted for the parent directory, unless `--cumulative` is used. > ++ > +Note that `--dirstat` does not use the regular diff machinery to calculate > +the changes (rather it is based on the rename detection machinery). Therefore, > +`--dirstat` may skip some changes that `--stat` does not skip. For example, > +rearranging the lines in a file will not be detected by `--dirstat`. Be positive: s/will not be detected/is not considered to be a change/, perhaps. Also "it is based on the rename detection machinery" is describing an implementation detail without helping the end users. Try to rephrase what Linus explained when he said "it is very much on purpose". Perhaps like this? Note that the `--dirstat` option computes the changes while ignoring pure code movements within a file. In other words, rearranging lines in a file is not counted as a change.