diff --stat: allow custom diffstat output width.

This adds two parameters to "diff --stat".

 . --stat-width=72 tells that the page should fit on 72-column output.

 . --stat-name-width=30 tells that the filename part is limited
   to 30 columns.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2006-09-26 18:53:02 -07:00
parent 4a0641b7cf
commit a2540023dc
2 changed files with 96 additions and 38 deletions

3
diff.h
View File

@ -69,6 +69,9 @@ struct diff_options {
const char *stat_sep;
long xdl_opts;
int stat_width;
int stat_name_width;
int nr_paths;
const char **paths;
int *pathlens;