diff --stat: enable limiting of the graph part

A new option --stat-graph-width=<width> can be used to limit the width
of the graph part even is more space is available. Up to <width>
columns will be used for the graph.

If commits changing a lot of lines are displayed in a wide terminal
window (200 or more columns), and the +- graph uses the full width,
the output can be hard to comfortably scan with a horizontal movement
of human eyes. Messages wrapped to about 80 columns would be
interspersed with very long +- lines. It makes sense to limit the
width of the graph part to a fixed value (e.g. 70 columns), even if
more columns are available.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2012-03-01 13:26:45 +01:00
committed by Junio C Hamano
parent c4432d5511
commit 969fe57b84
4 changed files with 30 additions and 2 deletions

1
diff.h
View File

@ -129,6 +129,7 @@ struct diff_options {
int stat_width;
int stat_name_width;
int stat_graph_width;
int stat_count;
const char *word_regex;
enum diff_words_type word_diff;