summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: af9fedc)
raw | patch | inline | side by side (parent: af9fedc)
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | |
Thu, 1 Mar 2012 12:26:40 +0000 (13:26 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 1 Mar 2012 17:13:53 +0000 (09:13 -0800) |
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>
width.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c | patch | blob | history | |
t/t4052-stat-output.sh | patch | blob | history |
diff --git a/builtin/log.c b/builtin/log.c
index 7d1f6f88a0e0f76bc8ee35155a532b641c14a845..d37ae2606ec4ecc9104233aaba64e72c5f49d538 100644 (file)
--- a/builtin/log.c
+++ b/builtin/log.c
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 29c06e59a60eeb85d2ba1d876d1dee5e296c47a9..56d3899d92a80b1683490125252e0e42bc42e646 100755 (executable)
--- a/t/t4052-stat-output.sh
+++ b/t/t4052-stat-output.sh
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
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