Allow specifying --dirstat cut-off percentage as a floating point number

Only the first digit after the decimal point is kept, as the dirstat
calculations all happen in permille.

Selftests verifying floating-point percentage input has been added.

Improved-by: Junio C Hamano <gitster@pobox.com>
Improved-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johan Herland
2011-04-29 11:36:20 +02:00
committed by Junio C Hamano
parent 2d17495196
commit 712d2c7dd8
3 changed files with 81 additions and 11 deletions

2
diff.h
View File

@ -114,7 +114,7 @@ struct diff_options {
int needed_rename_limit;
int degraded_cc_to_c;
int show_rename_progress;
int dirstat_percent;
int dirstat_permille;
int setup;
int abbrev;
const char *prefix;