summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-03-01 12:26:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-03-01 17:13:53 (GMT)
commit666c92a229de10f8bbfc33cf6f92aad8733f0002 (patch)
tree760f945f90262487c29928638ba05bc3f9219444
parentaf9fedc12873bf331019a502ed1fc944fa986713 (diff)
downloadgit-666c92a229de10f8bbfc33cf6f92aad8733f0002.zip
git-666c92a229de10f8bbfc33cf6f92aad8733f0002.tar.gz
git-666c92a229de10f8bbfc33cf6f92aad8733f0002.tar.bz2
show --stat: use the full terminal width
Make show --stat behave like diff --stat and use the full terminal width. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/log.c2
-rwxr-xr-xt/t4052-stat-output.sh4
2 files changed, 4 insertions, 2 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 7d1f6f8..d37ae26 100644
--- a/builtin/log.c
+++ b/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 a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
index 29c06e5..56d3899 100755
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
@@ -97,7 +97,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