[PATCH 4/8 v6] show --stat: use the full terminal width

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make show --stat behave like diff --stat and use the full terminal
width.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@xxxxxxxxx>
---
 builtin/log.c          | 2 ++
 t/t4052-stat-output.sh | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git builtin/log.c builtin/log.c
index 7d1f6f8..d37ae26 100644
--- builtin/log.c
+++ builtin/log.c
@@ -447,6 +447,8 @@ int cmd_show(int argc, const char **argv, const char *prefix)
 	rev.diff = 1;
 	rev.always_show_header = 1;
 	rev.no_walk = 1;
+	rev.diffopt.stat_width = -1; 	/* Scale to real terminal size */
+
 	memset(&opt, 0, sizeof(opt));
 	opt.def = "HEAD";
 	opt.tweak = show_rev_tweak_rev;
diff --git t/t4052-stat-output.sh t/t4052-stat-output.sh
index 4bfd6a5..91c4ba8 100755
--- t/t4052-stat-output.sh
+++ t/t4052-stat-output.sh
@@ -95,7 +95,7 @@ do
 done <<\EOF
 ignores expect80 format-patch -1 --stdout
 respects expect200 diff HEAD^ HEAD --stat
-ignores expect80 show --stat
+respects expect200 show --stat
 ignores expect80 log -1 --stat
 EOF
 
@@ -163,7 +163,7 @@ do
 done <<\EOF
 ignores expect80 format-patch -1 --stdout
 respects expect200 diff HEAD^ HEAD --stat
-ignores expect80 show --stat
+respects expect200 show --stat
 ignores expect80 log -1 --stat
 EOF
 
-- 
1.7.9.1.353.g684b4

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]