From: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
To: git@vger.kernel.org, gitster@pobox.com
Cc: pclouds@gmail.com, j.sixt@viscovery.net,
"Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
Subject: [PATCH v7a 3/9] show --stat: use the full terminal width
Date: Thu, 1 Mar 2012 13:26:40 +0100 [thread overview]
Message-ID: <1330604806-30288-3-git-send-email-zbyszek@in.waw.pl> (raw)
In-Reply-To: <1330604806-30288-1-git-send-email-zbyszek@in.waw.pl>
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>
---
builtin/log.c | 2 ++
t/t4052-stat-output.sh | 4 ++--
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
--
1.7.9.2.399.gdf4d.dirty
next prev parent reply other threads:[~2012-03-01 12:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 6:53 Incremental updates to What's cooking Junio C Hamano
2012-02-29 7:37 ` Zbigniew Jędrzejewski-Szmek
2012-02-29 8:39 ` Junio C Hamano
2012-02-29 13:50 ` Zbigniew Jędrzejewski-Szmek
2012-02-29 19:28 ` Junio C Hamano
2012-02-29 20:19 ` Zbigniew Jędrzejewski-Szmek
2012-02-29 20:48 ` Junio C Hamano
2012-03-01 12:26 ` [PATCH v7a 1/9] diff --stat: tests for long filenames and big change counts Zbigniew Jędrzejewski-Szmek
2012-03-01 12:26 ` [PATCH v7a 2/9] diff --stat: use the full terminal width Zbigniew Jędrzejewski-Szmek
2012-03-01 12:26 ` Zbigniew Jędrzejewski-Szmek [this message]
2012-03-01 12:26 ` [PATCH v7a 4/9] log " Zbigniew Jędrzejewski-Szmek
2012-03-01 12:26 ` [PATCH v7a 5/9] merge " Zbigniew Jędrzejewski-Szmek
2012-03-01 12:26 ` [PATCH v7a 6/9] diff --stat: use a maximum of 5/8 for the filename part Zbigniew Jędrzejewski-Szmek
2012-03-01 17:18 ` Junio C Hamano
2012-03-26 23:45 ` Jeff King
2012-03-27 5:10 ` [PATCH] t4052: unset $COLUMNS inherited from environment Zbigniew Jędrzejewski-Szmek
2012-03-27 5:17 ` Jeff King
2012-03-27 6:22 ` [PATCH v2] tests: unset COLUMNS " Zbigniew Jędrzejewski-Szmek
2012-03-27 18:44 ` Jeff King
2012-03-27 5:32 ` [PATCH] t4052: unset $COLUMNS " Johannes Sixt
2012-03-01 12:26 ` [PATCH v7a 7/9] diff --stat: add a test for output with COLUMNS=40 Zbigniew Jędrzejewski-Szmek
2012-03-01 12:26 ` [PATCH v7a 8/9] diff --stat: enable limiting of the graph part Zbigniew Jędrzejewski-Szmek
2012-03-01 12:26 ` [PATCH v7a 9/9] diff --stat: add config option to limit graph width Zbigniew Jędrzejewski-Szmek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330604806-30288-3-git-send-email-zbyszek@in.waw.pl \
--to=zbyszek@in.waw.pl \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).