aboutsummaryrefslogtreecommitdiff
path: root/t/t4052-stat-output.sh
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-03-01 13:26:45 +0100
committerJunio C Hamano <gitster@pobox.com>2012-03-01 09:15:47 -0800
commit969fe57b844a514747c1d5d66e0698dc53ed473d (patch)
tree67d4ade9fcabea5bbdd2bb7bc6e7da26358bf25e /t/t4052-stat-output.sh
parentc4432d5511f2897b56cd921632c86c1e2ca78159 (diff)
downloadgit-969fe57b844a514747c1d5d66e0698dc53ed473d.tar.gz
git-969fe57b844a514747c1d5d66e0698dc53ed473d.tar.xz
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>
Diffstat (limited to 't/t4052-stat-output.sh')
-rwxr-xr-xt/t4052-stat-output.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index 9a8f62dde..3d823af38 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -136,6 +136,12 @@ do
grep " | " output >actual &&
test_cmp expect actual
'
+
+ test_expect_success "$cmd --stat-graph--width with big change" '
+ git $cmd $args --stat-graph-width=26 >output
+ grep " | " output >actual &&
+ test_cmp expect actual
+ '
done <<\EOF
format-patch -1 --stdout
diff HEAD^ HEAD --stat