• J
    Make --dirstat=0 output directories that contribute < 0.1% of changes · 58a8756a
    Johan Herland 提交于
    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: NJohan Herland <johan@herland.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    58a8756a
diff.c 119.0 KB