author | Johan Herland <johan@herland.net> | |
Fri, 29 Apr 2011 09:36:17 +0000 (11:36 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 29 Apr 2011 18:17:36 +0000 (11:17 -0700) | ||
commit | 58a8756a98fbd08add1c25ac61ffa4f4f8a6e776 | |
tree | cd793e1d94b4e0e998ff107638dbf489545b2a58 | tree | snapshot |
parent | 5502039d87337e076e69f7de949cb0e0360de16f | commit | diff |
Make --dirstat=0 output directories that contribute < 0.1% of changes
The expected output from --dirstat=0, is to include any directory with
changes, even if those changes contribute a minuscule portion of the total
changes. However, currently, directories that contribute less than 0.1% are
not included, since their 'permille' value is 0, and there is an
'if (permille)' check in gather_dirstat() that causes them to be ignored.
This test is obviously intended to exclude directories that contribute no
changes whatsoever, but in this case, it hits too broadly. The correct
check is against 'this_dir' from which the permille is calculated. Only if
this value is 0 does the directory truly contribute no changes, and should
be skipped from the output.
This patches fixes this issue, and updates corresponding testcases to
expect the new behvaior.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The expected output from --dirstat=0, is to include any directory with
changes, even if those changes contribute a minuscule portion of the total
changes. However, currently, directories that contribute less than 0.1% are
not included, since their 'permille' value is 0, and there is an
'if (permille)' check in gather_dirstat() that causes them to be ignored.
This test is obviously intended to exclude directories that contribute no
changes whatsoever, but in this case, it hits too broadly. The correct
check is against 'this_dir' from which the permille is calculated. Only if
this value is 0 does the directory truly contribute no changes, and should
be skipped from the output.
This patches fixes this issue, and updates corresponding testcases to
expect the new behvaior.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | diff | blob | history | |
t/t4047-diff-dirstat.sh | diff | blob | history |